From nobody Fri Nov 29 12:37:27 2024 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=1637847654; cv=none; d=zohomail.com; s=zohoarc; b=cm4QNye1LDSb48YSlFKSa1ngImnATYihUwS8M8agcRY5ju5Onw/pio5y7Mw0WNg0IbgOwIDy0cuasuHTbyi4kYdSM9lw8twzbp+eNVHbh5JhRtdQQh3uvyNSICCGXXC1Er54GvUzkbtrVELbhmegSKzkvL3tYt1oIHCtjE1ptqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847654; 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=pbIV9quZrLWk4mMTaf7tQuVgzp362B2illOOEjt9LOg=; b=fiPn8B9DBz5YBgwkpJZXjEn0NELAYaMJ+7YmqRm3xRYTEFl/KA5uDlqtEVLETVm+1bZdrydnRuMMNyTi+PVb9rppzAou6uobTrqx+gwaUiMDF3JRP0RQ0frA/CJcdKSwf4X5yTPDKms0co1uV7IQSeaCwSfUXQJadyWWi/IdTRA= 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 1637847654151544.3027323608255; Thu, 25 Nov 2021 05:40:54 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231205.399920 (Exim 4.92) (envelope-from ) id 1mqEzA-00077j-V6; Thu, 25 Nov 2021 13:40:24 +0000 Received: by outflank-mailman (output) from mailman id 231205.399920; Thu, 25 Nov 2021 13:40:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqEzA-00077c-S6; Thu, 25 Nov 2021 13:40:24 +0000 Received: by outflank-mailman (input) for mailman id 231205; Thu, 25 Nov 2021 13:40:23 +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 1mqEz9-00076i-Na for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:23 +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 3bb2965d-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:40:22 +0100 (CET) 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: 3bb2965d-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847622; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3TQKgoJFKLvb/aD7eyqYNC+fnivFbK5/r2SXs8WsbPs=; b=Kje9dQOfQct130uYUl4Ir//S4nQ2kGJ9Il5s5h9FeGO2y+ImNmWEMZbC CA539PslonDGF+tHl3Th66OinhXVS1rqpBxml5zl7vKvHu88Qz/oqb8UX jdIennNga6ONngXZ8DbZxZzlH+5EUIlnEWE0mordkDn4+dlgZobcYNth1 s=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: KMIXkhlZhaEdfsEkQIeuQqBHWEH549fyuRTXa4OHmLUSWoU5ue6QN7iEdTafcSHwP6kDAyyebG 6fu7WqK2HidQJXM583jd8mylgGnKbBLxxxSBiQsAXbkbgy6fBZx5oYmUNz5zYouNFzsPdTzcEW MAT3W1DEVKH1oxRN7MTgIcSvHzi8I41gaP2DFX12/lGZn6R7ymEHjwz1JqZAz+5T42Wb0NpAil U8rYRS9D8GmDJtrY/x1Q443+zmMk0ENKWIvlGUzNrsyfl8wnMKJJPMWx9Gr9sqbI1Pv+WumPK3 pA4jmQKiw0RcNTO/AUEhf5RL X-SBRS: 5.1 X-MesageID: 60634057 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:FEB6h61ZLSIXXSw8MPbD5Xh2kn2cJEfYwER7XKvMYLTBsI5bpzJTm 2pOUW6BP/aMNDPzf9lzOY6y9klVvMPQyddiSAZopC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkS5PE3oHJ9RGQ74nRLlbHILOCan8ZqTNMEn970Es6wbNh2OaEvPDia++zk YKqyyHgEAfNNw5cagr4PIra9XuDFNyr0N8plgRWicJj5TcypFFMZH4rHomjLmOQf2VhNrXSq 9Avbl2O1jixEx8FUrtJm1tgG6EAaua60QOm0hK6V0U+6/TrS+NbPqsTbZIhhUlrZzqhgvlui 4xDq8yJUAZqA6PKh9YFVDh2HHQrVUFG0OevzXmXtMWSywvNcmf2wuUoB0YzVWEa0r8pWycUr 6VecW1TKEDY7w616OvTpu1Ej8I/LM7tLcUHt2tp1z3xBvc6W5HTBa7N4Le02R9u3p4VQa6DO KL1bxJtdlPCbkBNAG0wJ6MCjr66g0nyKWJh/Qf9Sa0f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HcBT78mptcRB4qy0lgnzVRLYJr9DC7q4c7QN4UQYxdye jLE1rDfg7l8x1bZdythHHfA6uNRmJAStU0Y11QFPVmIxoLIi/JfMMe9KtjrotC5Fil67t8= IronPort-HdrOrdr: A9a23:KjzVs6GjUYJIyzndpLqE7seALOsnbusQ8zAXP0AYc3Nom6uj5q eTdZUgpGbJYVkqOU3I9ersBEDEewK/yXcX2/h0AV7BZmnbUQKTRekIh7cKgQeQfhEWntQts5 uIGJIRNDSfNzRHZL7BkWqFL+o= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634057" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , "Bertrand Marquis" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v8 01/47] build: factorise generation of the linker scripts Date: Thu, 25 Nov 2021 13:39:20 +0000 Message-ID: <20211125134006.1076646-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847656194100003 Content-Type: text/plain; charset="utf-8" In Arm and X86 makefile, generating the linker script is the same, so we can simply have both call the same macro. We need to add *.lds files into extra-y so that Rules.mk can find the .*.cmd dependency file and load it. Change made to the command line: - Use cpp_flags macro which simply filter -Wa,% options from $(a_flags). - Added -D__LINKER__ even it is only used by Arm's lds. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich Acked-by: Julien Grall --- Notes: v6: - CPP already used instead of CC -E - -Ui386 already removed - cpp_flags is now a macro - rebased =20 v5: - rename cc_lds_S to cpp_lds_S as the binary runned is now CPP - Use new cpp_flags instead of the open-coded filter of a_flags. =20 v4: - fix rebuild by adding FORCE as dependency - Use $(CPP) - remove -Ui386 - avoid using "define" for cmd_cc_lds_S, as adding '; \' on each line is still mandatory for if_changed (or cmd) macro to work. xen/Rules.mk | 4 ++++ xen/arch/arm/Makefile | 6 ++++-- xen/arch/x86/Makefile | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 5e0699e58b2b..d21930a7bf71 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -238,6 +238,10 @@ cmd_cpp_s_S =3D $(CPP) $(call cpp_flags,$(a_flags)) -M= Q $@ -o $@ $< %.s: %.S FORCE $(call if_changed,cpp_s_S) =20 +# Linker scripts, .lds.S -> .lds +quiet_cmd_cpp_lds_S =3D LDS $@ +cmd_cpp_lds_S =3D $(CPP) -P $(call cpp_flags,$(a_flags)) -D__LINKER__ -MQ = $@ -o $@ $< + # Add intermediate targets: # When building objects with specific suffix patterns, add intermediate # targets that the final targets are derived from. diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 07f634508eee..a3a497bafe89 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -67,6 +67,8 @@ obj-y +=3D vsmc.o obj-y +=3D vpsci.o obj-y +=3D vuart.o =20 +extra-y +=3D xen.lds + #obj-bin-y +=3D ....o =20 ifneq ($(CONFIG_DTB_FILE),"") @@ -132,8 +134,8 @@ $(TARGET)-syms: prelink.o xen.lds .PHONY: include include: =20 -xen.lds: xen.lds.S - $(CPP) -P $(a_flags) -D__LINKER__ -MQ $@ -o $@ $< +xen.lds: xen.lds.S FORCE + $(call if_changed,cpp_lds_S) =20 dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) =20 diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 69b6cfaded25..669e16e72690 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -78,6 +78,7 @@ obj-y +=3D sysctl.o endif =20 extra-y +=3D asm-macros.i +extra-y +=3D xen.lds =20 ifneq ($(CONFIG_HVM),y) x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label @@ -238,6 +239,7 @@ endif note_file_option ?=3D $(note_file) =20 ifeq ($(XEN_BUILD_PE),y) +extra-y +=3D efi.lds $(TARGET).efi: prelink.o $(note_file) efi.lds efi/relocs-dummy.o efi/mkrel= oc ifeq ($(CONFIG_DEBUG_INFO),y) $(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug inf= o from $(@F)" @@ -290,8 +292,8 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i M= akefile $(call move-if-changed,$@.new,$@) =20 efi.lds: AFLAGS-y +=3D -DEFI -xen.lds efi.lds: xen.lds.S - $(CPP) -P $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< +xen.lds efi.lds: xen.lds.S FORCE + $(call if_changed,cpp_lds_S) =20 boot/mkelf32: boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637847657; cv=none; d=zohomail.com; s=zohoarc; b=Pj8MrWAQed0M4t1T1yq6Rl5WMdcDXF5q6S8Khi2Nl5M3GKTCva2QW1ZLHA3aWsZR9N/txayYK5f8U4f1394uy2e0/H7wN1/iO4uY5fOPiaWYeZ+iiBZUYbNSFFQ9ik5kawzrTyXCeKdrcpwhALrq8HMauUeZX+qqBcEGbBljf1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847657; 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=Sx6qAhX1Vjy7GoanBPPah/Xx3Fn33BztmwOYUGoG8zU=; b=TGDOnKNdieoAO17XSXxVR4592EDxuSTAKQ0DS1jdAmURBwdLyOM0RhIk7SQYohWWpJ3lNHEQVJHblBqNbyaQlVjgSFvlOryrlQ6KUddvbYxsmAQ2FJdtK0wVJSAD9vGQ/g3DFO5eiMAssDFYIK7ygirAC/iWOB+XFLyv+RoYBG4= 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 1637847657692759.1816160110698; Thu, 25 Nov 2021 05:40:57 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231209.399951 (Exim 4.92) (envelope-from ) id 1mqEzN-0007mJ-4v; Thu, 25 Nov 2021 13:40:37 +0000 Received: by outflank-mailman (output) from mailman id 231209.399951; Thu, 25 Nov 2021 13:40:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqEzM-0007lo-Sk; Thu, 25 Nov 2021 13:40:36 +0000 Received: by outflank-mailman (input) for mailman id 231209; Thu, 25 Nov 2021 13:40:35 +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 1mqEzK-0007NX-If for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:35 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 40d07d31-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:40:30 +0100 (CET) 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: 40d07d31-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847630; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DzvwX2p4CzntBZ/jg2t5IVxo/46/IjDyI06TF7RS/n0=; b=SxHOly6P+/d7xeXpygD00VHOIWBs5oorYHNI0ZNeJjdMDxb+l3j0GV8x R8/USxqt0+Pm5z55faJ6ZkWm2DDS/x1Dru2Pvxon1di0Qu0+MtH2Th6el 6xzEDxCugcK6fCaNm9BFxi8B/uGL7f6cDv3UDPFY1iUxyqXHhQ3JLlbwj Y=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: Q9l8HMJyru+zeX1DEV0Mk8DTWIP50rx9K6gtZLB6b4HLZb00xxuFKu9dH5F1H37s5fnLd4hvpt M8uYH7FSqdDlgQ5CBYVZuQYcKMKEWtekJKGG+UPNkZBI4XgI1AOFEO0g7bcb51wTRG3D4AHhzW Zu2o9LkeOeTfUfUkUunNbKzzdWcwgvtJJv/uwv9p4SM3i64squrqqbMdJL8/MwO2kUt7txjIW4 LorpcUJKoP4z2r7Xg2ahMJ+ldJc453x70QHT2BlLMihMTpuIaMFclsCWCghoOG3eBK1PgVzGDV pOh524xP3NEOxgjfWRcodffH X-SBRS: 5.1 X-MesageID: 58617606 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.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IKoaSvp037Eqv3oedfUzSL3gqy nOpoV86faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrZ uIGJIeNDSfNzdHZL7BkWuFL+o= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58617606" From: Anthony PERARD To: CC: Anthony PERARD , Paul Durrant , Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Tamas K Lengyel , Alexandru Isaila , "Petre Pircalabu" , Volodymyr Babchuk , Bertrand Marquis , Konrad Rzeszutek Wilk , Ross Lagerwall , Bob Eshleman , "Alistair Francis" , Connor Davis , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Jun Nakajima , Kevin Tian , Lukasz Hawrylko Subject: [XEN PATCH v8 02/47] xen: move include/asm-* to arch/*/include/asm Date: Thu, 25 Nov 2021 13:39:21 +0000 Message-ID: <20211125134006.1076646-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847659407100002 This avoid the need to create the symbolic link "include/asm". Whenever a comment refer to an "asm" headers, this patch avoid spelling the arch when not needed to avoid some code churn. One unrelated change is to sort entries in MAINTAINERS for "INTEL(R) VT FOR X86 (VT-X)" Signed-off-by: Anthony PERARD Acked-by: Paul Durrant Acked-by: Andrew Cooper Acked-by: Jan Beulich Acked-by: Julien Grall --- Notes: v8: - in tools/include/Makefile, write `ln -s $dir/asm xen/` instead of `ln -s $dir/asm xen/asm`. - in common/page_alloc.c, fix comment specify the full location of the arch specific numa.h header (instead of just asm/numa.h). =20 v7: - fix MAINTAINERS entry for arch-riscv - move to arch/*/include/asm instead - In most comment refering to an asm headers, avoid spelling the arch name when not needed. That doesn't work "common/efi/runtime.c" as the description of Xen's stack is only in x86's "asm/current.h" and not in arm's "asm/current.= h". - sort entries in MAINTAINERS for "INTEL(R) VT FOR X86 (VT-X)" .gitignore | 5 +-- MAINTAINERS | 37 +++++++++---------- tools/include/Makefile | 2 +- tools/misc/xen-access.c | 4 +- tools/tests/vhpet/Makefile | 2 +- xen/Makefile | 13 +++---- xen/arch/arm/README.LinuxPrimitives | 10 ++--- xen/arch/arm/arch.mk | 1 + xen/arch/arm/arm32/head.S | 2 +- xen/arch/arm/arm64/head.S | 2 +- .../asm-arm =3D> arch/arm/include/asm}/acpi.h | 0 .../arm/include/asm}/alternative.h | 0 .../asm-arm =3D> arch/arm/include/asm}/altp2m.h | 0 .../arm/include/asm}/arm32/atomic.h | 0 .../arm/include/asm}/arm32/bitops.h | 0 .../arm/include/asm}/arm32/bug.h | 0 .../arm/include/asm}/arm32/cmpxchg.h | 0 .../arm/include/asm}/arm32/flushtlb.h | 0 .../arm/include/asm}/arm32/insn.h | 0 .../arm/include/asm}/arm32/io.h | 0 .../arm/include/asm}/arm32/macros.h | 0 .../arm/include/asm}/arm32/mm.h | 0 .../arm/include/asm}/arm32/page.h | 0 .../arm/include/asm}/arm32/processor.h | 0 .../arm/include/asm}/arm32/sysregs.h | 0 .../arm/include/asm}/arm32/system.h | 0 .../arm/include/asm}/arm32/traps.h | 0 .../arm/include/asm}/arm32/vfp.h | 0 .../arm/include/asm}/arm64/atomic.h | 0 .../arm/include/asm}/arm64/bitops.h | 0 .../arm/include/asm}/arm64/brk.h | 0 .../arm/include/asm}/arm64/bug.h | 0 .../arm/include/asm}/arm64/cmpxchg.h | 0 .../arm/include/asm}/arm64/cpufeature.h | 0 .../arm/include/asm}/arm64/efibind.h | 0 .../arm/include/asm}/arm64/flushtlb.h | 0 .../arm/include/asm}/arm64/hsr.h | 0 .../arm/include/asm}/arm64/insn.h | 0 .../arm/include/asm}/arm64/io.h | 0 .../arm/include/asm}/arm64/macros.h | 0 .../arm/include/asm}/arm64/mm.h | 0 .../arm/include/asm}/arm64/page.h | 0 .../arm/include/asm}/arm64/processor.h | 0 .../arm/include/asm}/arm64/sysregs.h | 0 .../arm/include/asm}/arm64/system.h | 0 .../arm/include/asm}/arm64/traps.h | 0 .../arm/include/asm}/arm64/vfp.h | 0 .../arm/include/asm}/asm_defns.h | 0 .../asm-arm =3D> arch/arm/include/asm}/atomic.h | 0 .../asm-arm =3D> arch/arm/include/asm}/bitops.h | 0 .../asm-arm =3D> arch/arm/include/asm}/bug.h | 0 .../arm/include/asm}/byteorder.h | 0 .../asm-arm =3D> arch/arm/include/asm}/cache.h | 0 .../arm/include/asm}/cadence-uart.h | 0 .../asm-arm =3D> arch/arm/include/asm}/config.h | 0 .../asm-arm =3D> arch/arm/include/asm}/cpregs.h | 0 .../arm/include/asm}/cpuerrata.h | 0 .../arm/include/asm}/cpufeature.h | 0 .../arm/include/asm}/current.h | 0 .../arm/include/asm}/debugger.h | 0 .../asm-arm =3D> arch/arm/include/asm}/delay.h | 0 .../asm-arm =3D> arch/arm/include/asm}/desc.h | 0 .../asm-arm =3D> arch/arm/include/asm}/device.h | 0 .../asm-arm =3D> arch/arm/include/asm}/div64.h | 0 .../asm-arm =3D> arch/arm/include/asm}/domain.h | 0 .../arm/include/asm}/domain_build.h | 0 .../arm/include/asm}/early_printk.h | 0 .../arm/include/asm}/efibind.h | 0 .../asm-arm =3D> arch/arm/include/asm}/elf.h | 0 .../asm-arm =3D> arch/arm/include/asm}/event.h | 0 .../arm/include/asm}/exynos4210-uart.h | 0 .../arm/include/asm}/flushtlb.h | 0 .../asm-arm =3D> arch/arm/include/asm}/gic.h | 0 .../arm/include/asm}/gic_v3_defs.h | 0 .../arm/include/asm}/gic_v3_its.h | 0 .../arm/include/asm}/grant_table.h | 0 .../arm/include/asm}/guest_access.h | 0 .../arm/include/asm}/guest_atomics.h | 0 .../arm/include/asm}/guest_walk.h | 0 .../arm/include/asm}/hardirq.h | 0 .../asm-arm =3D> arch/arm/include/asm}/hsr.h | 0 .../arm/include/asm}/hypercall.h | 0 .../asm-arm =3D> arch/arm/include/asm}/init.h | 0 .../asm-arm =3D> arch/arm/include/asm}/insn.h | 0 .../asm-arm =3D> arch/arm/include/asm}/io.h | 0 .../asm-arm =3D> arch/arm/include/asm}/iocap.h | 0 .../asm-arm =3D> arch/arm/include/asm}/iommu.h | 0 .../arm/include/asm}/iommu_fwspec.h | 0 .../asm-arm =3D> arch/arm/include/asm}/ioreq.h | 0 .../asm-arm =3D> arch/arm/include/asm}/irq.h | 0 .../asm-arm =3D> arch/arm/include/asm}/kernel.h | 0 .../arm/include/asm}/livepatch.h | 0 .../asm-arm =3D> arch/arm/include/asm}/lpae.h | 0 .../asm-arm =3D> arch/arm/include/asm}/macros.h | 0 .../arm/include/asm}/mem_access.h | 0 .../asm-arm =3D> arch/arm/include/asm}/mm.h | 0 .../asm-arm =3D> arch/arm/include/asm}/mmio.h | 0 .../arm/include/asm}/monitor.h | 0 .../arm/include/asm}/new_vgic.h | 0 .../asm-arm =3D> arch/arm/include/asm}/nospec.h | 0 .../asm-arm =3D> arch/arm/include/asm}/numa.h | 0 .../asm-arm =3D> arch/arm/include/asm}/p2m.h | 0 .../arm/include/asm}/page-bits.h | 0 .../asm-arm =3D> arch/arm/include/asm}/page.h | 0 .../asm-arm =3D> arch/arm/include/asm}/paging.h | 0 .../asm-arm =3D> arch/arm/include/asm}/pci.h | 0 .../asm-arm =3D> arch/arm/include/asm}/percpu.h | 0 .../asm-arm =3D> arch/arm/include/asm}/perfc.h | 0 .../arm/include/asm}/perfc_defn.h | 0 .../arm/include/asm}/pl011-uart.h | 0 .../arm/include/asm}/platform.h | 0 .../arm/include/asm}/platforms/exynos5.h | 0 .../arm/include/asm}/platforms/midway.h | 0 .../arm/include/asm}/platforms/omap5.h | 0 .../arm/include/asm}/platforms/vexpress.h | 0 .../asm}/platforms/xilinx-zynqmp-eemi.h | 0 .../arm/include/asm}/processor.h | 0 .../arm/include/asm}/procinfo.h | 0 .../asm-arm =3D> arch/arm/include/asm}/psci.h | 0 .../asm-arm =3D> arch/arm/include/asm}/random.h | 0 .../asm-arm =3D> arch/arm/include/asm}/regs.h | 0 .../arm/include/asm}/scif-uart.h | 0 .../asm-arm =3D> arch/arm/include/asm}/setup.h | 0 .../arm/include/asm}/short-desc.h | 0 .../asm-arm =3D> arch/arm/include/asm}/smccc.h | 0 .../asm-arm =3D> arch/arm/include/asm}/smp.h | 0 .../arm/include/asm}/softirq.h | 0 .../arm/include/asm}/spinlock.h | 0 .../asm-arm =3D> arch/arm/include/asm}/string.h | 0 .../arm/include/asm}/sysregs.h | 0 .../asm-arm =3D> arch/arm/include/asm}/system.h | 0 .../arm/include/asm}/tee/optee_msg.h | 0 .../arm/include/asm}/tee/optee_rpc_cmd.h | 0 .../arm/include/asm}/tee/optee_smc.h | 0 .../arm/include/asm}/tee/tee.h | 0 .../asm-arm =3D> arch/arm/include/asm}/time.h | 0 .../asm-arm =3D> arch/arm/include/asm}/trace.h | 0 .../asm-arm =3D> arch/arm/include/asm}/traps.h | 0 .../asm-arm =3D> arch/arm/include/asm}/types.h | 0 .../asm-arm =3D> arch/arm/include/asm}/vfp.h | 0 .../arm/include/asm}/vgic-emul.h | 0 .../asm-arm =3D> arch/arm/include/asm}/vgic.h | 0 .../arm/include/asm}/vm_event.h | 0 .../asm-arm =3D> arch/arm/include/asm}/vpl011.h | 0 .../asm-arm =3D> arch/arm/include/asm}/vpsci.h | 0 .../asm-arm =3D> arch/arm/include/asm}/vreg.h | 0 .../asm-arm =3D> arch/arm/include/asm}/vtimer.h | 0 .../arm/include/asm}/xenoprof.h | 0 xen/arch/arm/smpboot.c | 2 +- xen/arch/arm/vpsci.c | 2 +- xen/arch/riscv/arch.mk | 1 + .../riscv/include/asm}/config.h | 0 xen/arch/x86/Makefile | 6 +-- xen/arch/x86/arch.mk | 5 ++- .../asm-x86 =3D> arch/x86/include/asm}/acpi.h | 0 .../x86/include/asm}/alternative-asm.h | 0 .../x86/include/asm}/alternative.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/altp2m.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/amd.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/apic.h | 0 .../x86/include/asm}/apicdef.h | 0 .../x86/include/asm}/asm-defns.h | 0 .../x86/include/asm}/asm_defns.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/atomic.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/bitops.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/bug.h | 0 .../x86/include/asm}/byteorder.h | 0 .../x86/include/asm}/bzimage.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/cache.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/compat.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/config.h | 0 .../x86/include/asm}/cpufeature.h | 0 .../x86/include/asm}/cpufeatures.h | 0 .../x86/include/asm}/cpufeatureset.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/cpuid.h | 0 .../x86/include/asm}/cpuidle.h | 0 .../x86/include/asm}/current.h | 2 +- .../x86/include/asm}/debugger.h | 0 .../x86/include/asm}/debugreg.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/delay.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/desc.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/device.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/div64.h | 0 .../x86/include/asm}/dom0_build.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/domain.h | 2 +- .../asm-x86 =3D> arch/x86/include/asm}/e820.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/edd.h | 0 .../x86/include/asm}/efibind.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/elf.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/event.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/fixmap.h | 0 .../x86/include/asm}/flushtlb.h | 0 .../x86/include/asm}/genapic.h | 0 .../x86/include/asm}/grant_table.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/guest.h | 0 .../x86/include/asm}/guest/hyperv-hcall.h | 0 .../x86/include/asm}/guest/hyperv-tlfs.h | 0 .../x86/include/asm}/guest/hyperv.h | 0 .../x86/include/asm}/guest/hypervisor.h | 0 .../x86/include/asm}/guest/pvh-boot.h | 0 .../x86/include/asm}/guest/xen-hcall.h | 0 .../x86/include/asm}/guest/xen.h | 0 .../x86/include/asm}/guest_access.h | 0 .../x86/include/asm}/guest_atomics.h | 0 .../x86/include/asm}/guest_pt.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/hap.h | 0 .../x86/include/asm}/hardirq.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/hpet.h | 0 .../x86/include/asm}/hvm/asid.h | 0 .../x86/include/asm}/hvm/cacheattr.h | 0 .../x86/include/asm}/hvm/domain.h | 0 .../x86/include/asm}/hvm/emulate.h | 0 .../x86/include/asm}/hvm/grant_table.h | 0 .../x86/include/asm}/hvm/guest_access.h | 0 .../x86/include/asm}/hvm/hvm.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/hvm/io.h | 0 .../x86/include/asm}/hvm/ioreq.h | 0 .../x86/include/asm}/hvm/irq.h | 0 .../x86/include/asm}/hvm/monitor.h | 0 .../x86/include/asm}/hvm/nestedhvm.h | 0 .../x86/include/asm}/hvm/save.h | 0 .../x86/include/asm}/hvm/support.h | 0 .../x86/include/asm}/hvm/svm/asid.h | 0 .../x86/include/asm}/hvm/svm/emulate.h | 0 .../x86/include/asm}/hvm/svm/intr.h | 0 .../x86/include/asm}/hvm/svm/nestedsvm.h | 0 .../x86/include/asm}/hvm/svm/svm.h | 0 .../x86/include/asm}/hvm/svm/svmdebug.h | 0 .../x86/include/asm}/hvm/svm/vmcb.h | 0 .../x86/include/asm}/hvm/trace.h | 0 .../x86/include/asm}/hvm/vcpu.h | 0 .../x86/include/asm}/hvm/vioapic.h | 0 .../x86/include/asm}/hvm/viridian.h | 0 .../x86/include/asm}/hvm/vlapic.h | 0 .../x86/include/asm}/hvm/vm_event.h | 0 .../x86/include/asm}/hvm/vmx/vmcs.h | 0 .../x86/include/asm}/hvm/vmx/vmx.h | 0 .../x86/include/asm}/hvm/vmx/vvmx.h | 0 .../x86/include/asm}/hvm/vpic.h | 0 .../x86/include/asm}/hvm/vpt.h | 0 .../x86/include/asm}/hypercall.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/i387.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/init.h | 0 .../x86/include/asm}/invpcid.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/io.h | 0 .../x86/include/asm}/io_apic.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/iocap.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/iommu.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/ioreq.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/irq.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/ldt.h | 0 .../x86/include/asm}/livepatch.h | 0 .../x86/include/asm}/mach-default/bios_ebda.h | 0 .../x86/include/asm}/mach-default/io_ports.h | 0 .../include/asm}/mach-default/irq_vectors.h | 0 .../include/asm}/mach-default/mach_mpparse.h | 0 .../include/asm}/mach-default/mach_mpspec.h | 0 .../x86/include/asm}/mach-generic/mach_apic.h | 0 .../include/asm}/mach-generic/mach_mpparse.h | 0 .../x86/include/asm}/machine_kexec.h | 0 .../x86/include/asm}/mc146818rtc.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/mce.h | 0 .../x86/include/asm}/mem_access.h | 0 .../x86/include/asm}/mem_paging.h | 0 .../x86/include/asm}/mem_sharing.h | 0 .../x86/include/asm}/microcode.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/mm.h | 0 .../x86/include/asm}/monitor.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/mpspec.h | 0 .../x86/include/asm}/mpspec_def.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/msi.h | 0 .../x86/include/asm}/msr-index.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/msr.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/mtrr.h | 0 .../x86/include/asm}/multicall.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/mwait.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/nmi.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/nops.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/nospec.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/numa.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/p2m.h | 0 .../x86/include/asm}/page-bits.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/page.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/paging.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/pci.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/percpu.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/perfc.h | 0 .../x86/include/asm}/perfc_defn.h | 0 .../x86/include/asm}/processor.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/psr.h | 0 .../x86/include/asm}/pv/domain.h | 0 .../x86/include/asm}/pv/grant_table.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/pv/mm.h | 0 .../x86/include/asm}/pv/shim.h | 0 .../x86/include/asm}/pv/trace.h | 0 .../x86/include/asm}/pv/traps.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/random.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/regs.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/setup.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/shadow.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/shared.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/smp.h | 0 .../x86/include/asm}/softirq.h | 0 .../x86/include/asm}/spec_ctrl.h | 0 .../x86/include/asm}/spec_ctrl_asm.h | 0 .../x86/include/asm}/spinlock.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/string.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/system.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/tboot.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/time.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/trace.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/traps.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/types.h | 0 .../x86/include/asm}/uaccess.h | 0 .../x86/include/asm}/unaligned.h | 0 .../x86/include/asm}/vm_event.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/vpmu.h | 0 .../x86/include/asm}/x86-defns.h | 0 .../x86/include/asm}/x86-vendors.h | 0 .../x86/include/asm}/x86_64/efibind.h | 0 .../x86/include/asm}/x86_64/elf.h | 0 .../x86/include/asm}/x86_64/page.h | 0 .../x86/include/asm}/x86_64/regs.h | 0 .../x86/include/asm}/x86_64/system.h | 0 .../x86/include/asm}/x86_64/uaccess.h | 0 .../x86/include/asm}/x86_emulate.h | 2 +- .../x86/include/asm}/xenoprof.h | 0 .../asm-x86 =3D> arch/x86/include/asm}/xstate.h | 0 xen/common/efi/runtime.c | 2 +- xen/common/page_alloc.c | 2 +- xen/include/xen/acpi.h | 5 ++- xen/include/xen/bitmap.h | 2 +- 332 files changed, 55 insertions(+), 56 deletions(-) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/acpi.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/alternative.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/altp2m.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/atomic.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/bitops.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/bug.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/cmpxchg.h (10= 0%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/flushtlb.h (1= 00%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/insn.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/io.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/macros.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/mm.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/page.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/processor.h (= 100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/sysregs.h (10= 0%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/system.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/traps.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm32/vfp.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/atomic.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/bitops.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/brk.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/bug.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/cmpxchg.h (10= 0%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/cpufeature.h = (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/efibind.h (10= 0%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/flushtlb.h (1= 00%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/hsr.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/insn.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/io.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/macros.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/mm.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/page.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/processor.h (= 100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/sysregs.h (10= 0%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/system.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/traps.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/arm64/vfp.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/asm_defns.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/atomic.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/bitops.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/bug.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/byteorder.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/cache.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/cadence-uart.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/config.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/cpregs.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/cpuerrata.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/cpufeature.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/current.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/debugger.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/delay.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/desc.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/device.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/div64.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/domain.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/domain_build.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/early_printk.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/efibind.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/elf.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/event.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/exynos4210-uart.h (= 100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/flushtlb.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/gic.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/gic_v3_defs.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/gic_v3_its.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/grant_table.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/guest_access.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/guest_atomics.h (10= 0%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/guest_walk.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/hardirq.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/hsr.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/hypercall.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/init.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/insn.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/io.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/iocap.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/iommu.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/iommu_fwspec.h (100= %) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/ioreq.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/irq.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/kernel.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/livepatch.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/lpae.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/macros.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/mem_access.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/mm.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/mmio.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/monitor.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/new_vgic.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/nospec.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/numa.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/p2m.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/page-bits.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/page.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/paging.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/pci.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/percpu.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/perfc.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/perfc_defn.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/pl011-uart.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/platform.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/platforms/exynos5.h= (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/platforms/midway.h = (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/platforms/omap5.h (= 100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/platforms/vexpress.= h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/platforms/xilinx-zy= nqmp-eemi.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/processor.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/procinfo.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/psci.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/random.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/regs.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/scif-uart.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/setup.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/short-desc.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/smccc.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/smp.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/softirq.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/spinlock.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/string.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/sysregs.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/system.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/tee/optee_msg.h (10= 0%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/tee/optee_rpc_cmd.h= (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/tee/optee_smc.h (10= 0%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/tee/tee.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/time.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/trace.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/traps.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/types.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/vfp.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/vgic-emul.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/vgic.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/vm_event.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/vpl011.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/vpsci.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/vreg.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/vtimer.h (100%) rename xen/{include/asm-arm =3D> arch/arm/include/asm}/xenoprof.h (100%) rename xen/{include/asm-riscv =3D> arch/riscv/include/asm}/config.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/acpi.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/alternative-asm.h (= 100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/alternative.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/altp2m.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/amd.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/apic.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/apicdef.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/asm-defns.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/asm_defns.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/atomic.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/bitops.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/bug.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/byteorder.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/bzimage.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/cache.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/compat.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/config.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/cpufeature.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/cpufeatures.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/cpufeatureset.h (10= 0%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/cpuid.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/cpuidle.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/current.h (99%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/debugger.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/debugreg.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/delay.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/desc.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/device.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/div64.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/dom0_build.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/domain.h (99%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/e820.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/edd.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/efibind.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/elf.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/event.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/fixmap.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/flushtlb.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/genapic.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/grant_table.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/guest.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/guest/hyperv-hcall.= h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/guest/hyperv-tlfs.h= (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/guest/hyperv.h (100= %) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/guest/hypervisor.h = (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/guest/pvh-boot.h (1= 00%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/guest/xen-hcall.h (= 100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/guest/xen.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/guest_access.h (100= %) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/guest_atomics.h (10= 0%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/guest_pt.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hap.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hardirq.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hpet.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/asid.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/cacheattr.h (10= 0%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/domain.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/emulate.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/grant_table.h (= 100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/guest_access.h = (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/hvm.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/io.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/ioreq.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/irq.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/monitor.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/nestedhvm.h (10= 0%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/save.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/support.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/svm/asid.h (100= %) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/svm/emulate.h (= 100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/svm/intr.h (100= %) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/svm/nestedsvm.h= (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/svm/svm.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/svm/svmdebug.h = (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/svm/vmcb.h (100= %) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/trace.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/vcpu.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/vioapic.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/viridian.h (100= %) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/vlapic.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/vm_event.h (100= %) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/vmx/vmcs.h (100= %) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/vmx/vmx.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/vmx/vvmx.h (100= %) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/vpic.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hvm/vpt.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/hypercall.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/i387.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/init.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/invpcid.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/io.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/io_apic.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/iocap.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/iommu.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/ioreq.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/irq.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/ldt.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/livepatch.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mach-default/bios_e= bda.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mach-default/io_por= ts.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mach-default/irq_ve= ctors.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mach-default/mach_m= pparse.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mach-default/mach_m= pspec.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mach-generic/mach_a= pic.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mach-generic/mach_m= pparse.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/machine_kexec.h (10= 0%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mc146818rtc.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mce.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mem_access.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mem_paging.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mem_sharing.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/microcode.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mm.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/monitor.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mpspec.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mpspec_def.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/msi.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/msr-index.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/msr.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mtrr.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/multicall.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/mwait.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/nmi.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/nops.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/nospec.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/numa.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/p2m.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/page-bits.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/page.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/paging.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/pci.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/percpu.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/perfc.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/perfc_defn.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/processor.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/psr.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/pv/domain.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/pv/grant_table.h (1= 00%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/pv/mm.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/pv/shim.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/pv/trace.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/pv/traps.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/random.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/regs.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/setup.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/shadow.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/shared.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/smp.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/softirq.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/spec_ctrl.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/spec_ctrl_asm.h (10= 0%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/spinlock.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/string.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/system.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/tboot.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/time.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/trace.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/traps.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/types.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/uaccess.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/unaligned.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/vm_event.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/vpmu.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/x86-defns.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/x86-vendors.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/x86_64/efibind.h (1= 00%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/x86_64/elf.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/x86_64/page.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/x86_64/regs.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/x86_64/system.h (10= 0%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/x86_64/uaccess.h (1= 00%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/x86_emulate.h (89%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/xenoprof.h (100%) rename xen/{include/asm-x86 =3D> arch/x86/include/asm}/xstate.h (100%) diff --git a/.gitignore b/.gitignore index 9513506dd948..841ba1c0a84c 100644 --- a/.gitignore +++ b/.gitignore @@ -316,6 +316,7 @@ xen/arch/x86/boot/*.lnk xen/arch/x86/efi.lds xen/arch/x86/efi/check.efi xen/arch/x86/efi/mkreloc +xen/arch/x86/include/asm/asm-macros.h xen/arch/*/xen.lds xen/arch/*/efi/boot.c xen/arch/*/efi/compat.c @@ -323,12 +324,10 @@ xen/arch/*/efi/ebmalloc.c xen/arch/*/efi/efi.h xen/arch/*/efi/pe.c xen/arch/*/efi/runtime.c +xen/arch/*/include/asm/asm-offsets.h xen/common/config_data.S xen/common/config.gz xen/include/headers*.chk -xen/include/asm -xen/include/asm-*/asm-offsets.h -xen/include/asm-x86/asm-macros.h xen/include/compat/* xen/include/config/ xen/include/generated/ diff --git a/MAINTAINERS b/MAINTAINERS index f67f70aed398..3f6ff32c05cd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -246,7 +246,6 @@ F: xen/drivers/char/omap-uart.c F: xen/drivers/char/pl011.c F: xen/drivers/char/scif-uart.c F: xen/drivers/passthrough/arm/ -F: xen/include/asm-arm/ F: xen/include/public/arch-arm/ F: xen/include/public/arch-arm.h =20 @@ -292,10 +291,10 @@ EFI M: Jan Beulich S: Supported F: xen/arch/x86/efi/ +F: xen/arch/x86/include/asm/efi*.h +F: xen/arch/x86/include/asm/x86_*/efi*.h F: xen/common/efi/ F: xen/include/efi/ -F: xen/include/asm-x86/efi*.h -F: xen/include/asm-x86/x86_*/efi*.h =20 GDBSX DEBUGGER M: Elena Ufimtseva @@ -321,8 +320,8 @@ F: xen/include/xen/hypfs.h INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT) R: Lukasz Hawrylko S: Odd Fixes +F: xen/arch/x86/include/asm/tboot.h F: xen/arch/x86/tboot.c -F: xen/include/asm-x86/tboot.h =20 INTEL(R) VT FOR DIRECTED I/O (VT-D) M: Kevin Tian @@ -333,10 +332,10 @@ INTEL(R) VT FOR X86 (VT-X) M: Jun Nakajima M: Kevin Tian S: Supported +F: xen/arch/x86/cpu/vpmu_intel.c F: xen/arch/x86/hvm/vmx/ +F: xen/arch/x86/include/asm/hvm/vmx/ F: xen/arch/x86/mm/p2m-ept.c -F: xen/include/asm-x86/hvm/vmx/ -F: xen/arch/x86/cpu/vpmu_intel.c =20 IOMMU VENDOR INDEPENDENT CODE M: Jan Beulich @@ -412,10 +411,10 @@ M: Ross Lagerwall S: Supported F: docs/misc/livepatch.pandoc F: tools/misc/xen-livepatch.c +F: xen/arch/*/include/asm/livepatch.h F: xen/arch/*/livepatch* F: xen/arch/*/*/livepatch* F: xen/common/livepatch* -F: xen/include/asm-*/livepatch.h F: xen/include/xen/livepatch* F: xen/test/livepatch/* =20 @@ -485,7 +484,6 @@ R: Connor Davis S: Supported F: config/riscv64.mk F: xen/arch/riscv/ -F: xen/include/asm-riscv/ =20 RTDS SCHEDULER M: Dario Faggioli @@ -514,8 +512,8 @@ F: stubdom/ TEE MEDIATORS M: Volodymyr Babchuk S: Supported +F: xen/arch/arm/include/asm/tee F: xen/arch/arm/tee/ -F: xen/include/asm-arm/tee =20 TOOLSTACK M: Ian Jackson @@ -543,6 +541,8 @@ F: tools/misc/xen-access.c F: xen/arch/*/monitor.c F: xen/arch/*/vm_event.c F: xen/arch/arm/mem_access.c +F: xen/arch/x86/include/asm/hvm/monitor.h +F: xen/arch/x86/include/asm/hvm/vm_event.h F: xen/arch/x86/mm/mem_access.c F: xen/arch/x86/hvm/monitor.c F: xen/arch/x86/hvm/vm_event.c @@ -552,8 +552,6 @@ F: xen/common/vm_event.c F: xen/include/*/mem_access.h F: xen/include/*/monitor.h F: xen/include/*/vm_event.h -F: xen/include/asm-x86/hvm/monitor.h -F: xen/include/asm-x86/hvm/vm_event.h =20 VPCI M: Roger Pau Monn=C3=A9 @@ -579,7 +577,6 @@ R: Wei Liu S: Supported L: xen-devel@lists.xenproject.org F: xen/arch/x86/ -F: xen/include/asm-x86/ F: xen/include/public/arch-x86/ F: xen/include/xen/lib/x86 F: xen/lib/x86 @@ -599,10 +596,10 @@ F: xen/arch/x86/hvm/emulate.c F: xen/arch/x86/hvm/intercept.c F: xen/arch/x86/hvm/io.c F: xen/arch/x86/hvm/ioreq.c -F: xen/include/asm-x86/hvm/emulate.h -F: xen/include/asm-x86/hvm/io.h -F: xen/include/asm-x86/hvm/ioreq.h -F: xen/include/asm-x86/ioreq.h +F: xen/arch/x86/include/asm/hvm/emulate.h +F: xen/arch/x86/include/asm/hvm/io.h +F: xen/arch/x86/include/asm/hvm/ioreq.h +F: xen/arch/x86/include/asm/ioreq.h =20 X86 MEMORY MANAGEMENT M: Jan Beulich @@ -634,10 +631,10 @@ M: Wei Liu S: Supported F: xen/arch/x86/guest/hyperv/ F: xen/arch/x86/hvm/viridian/ -F: xen/include/asm-x86/guest/hyperv.h -F: xen/include/asm-x86/guest/hyperv-hcall.h -F: xen/include/asm-x86/guest/hyperv-tlfs.h -F: xen/include/asm-x86/hvm/viridian.h +F: xen/arch/x86/include/asm/guest/hyperv.h +F: xen/arch/x86/include/asm/guest/hyperv-hcall.h +F: xen/arch/x86/include/asm/guest/hyperv-tlfs.h +F: xen/arch/x86/include/asm/hvm/viridian.h =20 XENSTORE M: Ian Jackson diff --git a/tools/include/Makefile b/tools/include/Makefile index 42605d46b937..d7b51006e032 100644 --- a/tools/include/Makefile +++ b/tools/include/Makefile @@ -30,7 +30,7 @@ xen-dir: ln -s $(XEN_ROOT)/xen/include/acpi/platform acpi/ ln -s $(XEN_ROOT)/xen/include/acpi/ac*.h acpi/ ifeq ($(CONFIG_X86),y) - ln -s $(XEN_ROOT)/xen/include/asm-x86 xen/asm + ln -s $(XEN_ROOT)/xen/arch/x86/include/asm xen/ mkdir -p xen/lib/x86 ln -s $(filter-out %autogen.h,$(wildcard $(XEN_ROOT)/xen/include/xen/lib/= x86/*.h)) xen/lib/x86/ ln -s $(XEN_ROOT)/xen/include/xen/lib/x86/Makefile xen/lib/x86/ diff --git a/tools/misc/xen-access.c b/tools/misc/xen-access.c index 4bbef0bd2e10..0731c20b8355 100644 --- a/tools/misc/xen-access.c +++ b/tools/misc/xen-access.c @@ -56,11 +56,11 @@ #define ERROR(a, b...) fprintf(stderr, a "\n", ## b) #define PERROR(a, b...) fprintf(stderr, a ": %s\n", ## b, strerror(errno)) =20 -/* From xen/include/asm-x86/processor.h */ +/* From xen/arch/x86/include/asm/processor.h */ #define X86_TRAP_DEBUG 1 #define X86_TRAP_INT3 3 =20 -/* From xen/include/asm-x86/x86-defns.h */ +/* From xen/arch/x86/include/asm/x86-defns.h */ #define X86_CR4_PGE 0x00000080 /* enable global pages */ =20 typedef struct vm_event { diff --git a/tools/tests/vhpet/Makefile b/tools/tests/vhpet/Makefile index cb88dd01c5f8..2d56ffdfd9c5 100644 --- a/tools/tests/vhpet/Makefile +++ b/tools/tests/vhpet/Makefile @@ -32,7 +32,7 @@ distclean: clean .PHONY: install install: =20 -hpet.h: $(XEN_ROOT)/xen/include/asm-x86/hpet.h +hpet.h: $(XEN_ROOT)/xen/arch/x86/include/asm/hpet.h cp $< $@ =20 hpet.c: $(XEN_ROOT)/xen/arch/x86/hvm/hpet.c diff --git a/xen/Makefile b/xen/Makefile index 1fd48af7ae82..b2a63edca1eb 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -166,7 +166,7 @@ ifeq ($(TARGET_ARCH),x86) t1 =3D $(call as-insn,$(CC),".L0: .L1: .skip (.L1 - .L0)",,-no-integrated-= as) =20 # Check whether clang asm()-s support .include. -t2 =3D $(call as-insn,$(CC) -I$(BASEDIR)/include,".include \"asm-x86/asm-d= efns.h\"",,-no-integrated-as) +t2 =3D $(call as-insn,$(CC) -I$(BASEDIR)/arch/x86/include,".include \"asm/= asm-defns.h\"",,-no-integrated-as) =20 # Check whether clang keeps .macro-s between asm()-s: # https://bugs.llvm.org/show_bug.cgi?id=3D36110 @@ -382,7 +382,7 @@ _clean: delete-unfresh-files -o -name ".*.o.tmp" -o -name "*~" -o -name "core" \ -o -name "*.gcno" -o -name ".*.cmd" -o -name "lib.a" \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map *~ core - rm -f asm-offsets.s include/asm-*/asm-offsets.h + rm -f asm-offsets.s arch/*/include/asm/asm-offsets.h rm -f .banner .allconfig.tmp =20 .PHONY: _distclean @@ -396,7 +396,6 @@ $(TARGET).gz: $(TARGET) $(TARGET): delete-unfresh-files $(MAKE) -C tools $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h - [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch])= ; \ do test -r arch/$(TARGET_ARCH)/efi/$$f || \ ln -nsf ../../../common/efi/$$f arch/$(TARGET_ARCH)/efi/; \ @@ -404,7 +403,7 @@ $(TARGET): delete-unfresh-files true $(MAKE) -f $(BASEDIR)/Rules.mk -C include $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) include - $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h + $(MAKE) -f $(BASEDIR)/Rules.mk arch/$(TARGET_ARCH)/include/asm/asm-offset= s.h $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ =20 # drivers/char/console.o contains static banner/compile info. Blow it away. @@ -450,7 +449,7 @@ asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/as= m-offsets.c $(CC) $(call cpp_flags,$(c_flags)) -S -g0 -o $@.new -MQ $@ $< $(call move-if-changed,$@.new,$@) =20 -include/asm-$(TARGET_ARCH)/asm-offsets.h: asm-offsets.s +arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: asm-offsets.s @(set -e; \ echo "/*"; \ echo " * DO NOT MODIFY."; \ @@ -468,8 +467,8 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h: asm-offsets.s =20 SUBDIRS =3D xsm arch/$(TARGET_ARCH) common drivers lib test define all_sources - ( find include/asm-$(TARGET_ARCH) -name '*.h' -print; \ - find include -name 'asm-*' -prune -o -name '*.h' -print; \ + ( find arch/$(TARGET_ARCH)/include -name '*.h' -print; \ + find include -name '*.h' -print; \ find $(SUBDIRS) -name '*.[chS]' -print ) endef =20 diff --git a/xen/arch/arm/README.LinuxPrimitives b/xen/arch/arm/README.Linu= xPrimitives index 664a9f89ed27..1d53e6a898da 100644 --- a/xen/arch/arm/README.LinuxPrimitives +++ b/xen/arch/arm/README.LinuxPrimitives @@ -8,19 +8,19 @@ arm64: =20 bitops: last sync @ v3.16-rc6 (last commit: 8715466b6027) =20 -linux/arch/arm64/include/asm/bitops.h xen/include/asm-arm/arm64/bitops.h +linux/arch/arm64/include/asm/bitops.h xen/arch/arm/include/asm/arm64/bit= ops.h =20 --------------------------------------------------------------------- =20 cmpxchg: last sync @ v3.16-rc6 (last commit: e1dfda9ced9b) =20 -linux/arch/arm64/include/asm/cmpxchg.h xen/include/asm-arm/arm64/cmpxchg.h +linux/arch/arm64/include/asm/cmpxchg.h xen/arch/arm/include/asm/arm64/cmp= xchg.h =20 --------------------------------------------------------------------- =20 atomics: last sync @ v3.16-rc6 (last commit: 8715466b6027) =20 -linux/arch/arm64/include/asm/atomic.h xen/include/asm-arm/arm64/atomic.h +linux/arch/arm64/include/asm/atomic.h xen/arch/arm/include/asm/arm64/ato= mic.h =20 The following functions were taken from Linux: atomic_add(), atomic_add_return(), atomic_sub(), atomic_sub_return(), @@ -76,13 +76,13 @@ diff -u ../linux/arch/arm/lib/findbit.S xen/arch/arm/ar= m32/lib/findbit.S =20 cmpxchg: last sync @ v3.16-rc6 (last commit: c32ffce0f66e) =20 -linux/arch/arm/include/asm/cmpxchg.h xen/include/asm-arm/arm32/cmpxchg.h +linux/arch/arm/include/asm/cmpxchg.h xen/arch/arm/include/asm/arm32/cmp= xchg.h =20 --------------------------------------------------------------------- =20 atomics: last sync @ v3.16-rc6 (last commit: 030d0178bdbd) =20 -linux/arch/arm/include/asm/atomic.h xen/include/asm-arm/arm32/atomic.h +linux/arch/arm/include/asm/atomic.h xen/arch/arm/include/asm/arm32/ato= mic.h =20 The following functions were taken from Linux: atomic_add(), atomic_add_return(), atomic_sub(), atomic_sub_return(), diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index 6a2982059486..c3ac443b3788 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -2,6 +2,7 @@ # arm-specific definitions =20 CFLAGS +=3D -I$(BASEDIR)/include +CFLAGS +=3D -I$(BASEDIR)/arch/$(TARGET_ARCH)/include =20 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) $(call cc-option-add,CFLAGS,CC,-Wnested-externs) diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S index 7178865f48c3..b5912d381b98 100644 --- a/xen/arch/arm/arm32/head.S +++ b/xen/arch/arm/arm32/head.S @@ -599,7 +599,7 @@ remove_identity_mapping: strd r2, r3, [r0, r1] =20 identity_mapping_removed: - /* See asm-arm/arm32/flushtlb.h for the explanation of the sequenc= e. */ + /* See asm/arm32/flushtlb.h for the explanation of the sequence. */ dsb nshst mcr CP32(r0, TLBIALLH) dsb nsh diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S index aa1f88c76498..51b00ab0bea6 100644 --- a/xen/arch/arm/arm64/head.S +++ b/xen/arch/arm/arm64/head.S @@ -737,7 +737,7 @@ remove_identity_mapping: str xzr, [x0, x1, lsl #3] =20 identity_mapping_removed: - /* See asm-arm/arm64/flushtlb.h for the explanation of the sequenc= e. */ + /* See asm/arm64/flushtlb.h for the explanation of the sequence. */ dsb nshst tlbi alle2 dsb nsh diff --git a/xen/include/asm-arm/acpi.h b/xen/arch/arm/include/asm/acpi.h similarity index 100% rename from xen/include/asm-arm/acpi.h rename to xen/arch/arm/include/asm/acpi.h diff --git a/xen/include/asm-arm/alternative.h b/xen/arch/arm/include/asm/a= lternative.h similarity index 100% rename from xen/include/asm-arm/alternative.h rename to xen/arch/arm/include/asm/alternative.h diff --git a/xen/include/asm-arm/altp2m.h b/xen/arch/arm/include/asm/altp2m= .h similarity index 100% rename from xen/include/asm-arm/altp2m.h rename to xen/arch/arm/include/asm/altp2m.h diff --git a/xen/include/asm-arm/arm32/atomic.h b/xen/arch/arm/include/asm/= arm32/atomic.h similarity index 100% rename from xen/include/asm-arm/arm32/atomic.h rename to xen/arch/arm/include/asm/arm32/atomic.h diff --git a/xen/include/asm-arm/arm32/bitops.h b/xen/arch/arm/include/asm/= arm32/bitops.h similarity index 100% rename from xen/include/asm-arm/arm32/bitops.h rename to xen/arch/arm/include/asm/arm32/bitops.h diff --git a/xen/include/asm-arm/arm32/bug.h b/xen/arch/arm/include/asm/arm= 32/bug.h similarity index 100% rename from xen/include/asm-arm/arm32/bug.h rename to xen/arch/arm/include/asm/arm32/bug.h diff --git a/xen/include/asm-arm/arm32/cmpxchg.h b/xen/arch/arm/include/asm= /arm32/cmpxchg.h similarity index 100% rename from xen/include/asm-arm/arm32/cmpxchg.h rename to xen/arch/arm/include/asm/arm32/cmpxchg.h diff --git a/xen/include/asm-arm/arm32/flushtlb.h b/xen/arch/arm/include/as= m/arm32/flushtlb.h similarity index 100% rename from xen/include/asm-arm/arm32/flushtlb.h rename to xen/arch/arm/include/asm/arm32/flushtlb.h diff --git a/xen/include/asm-arm/arm32/insn.h b/xen/arch/arm/include/asm/ar= m32/insn.h similarity index 100% rename from xen/include/asm-arm/arm32/insn.h rename to xen/arch/arm/include/asm/arm32/insn.h diff --git a/xen/include/asm-arm/arm32/io.h b/xen/arch/arm/include/asm/arm3= 2/io.h similarity index 100% rename from xen/include/asm-arm/arm32/io.h rename to xen/arch/arm/include/asm/arm32/io.h diff --git a/xen/include/asm-arm/arm32/macros.h b/xen/arch/arm/include/asm/= arm32/macros.h similarity index 100% rename from xen/include/asm-arm/arm32/macros.h rename to xen/arch/arm/include/asm/arm32/macros.h diff --git a/xen/include/asm-arm/arm32/mm.h b/xen/arch/arm/include/asm/arm3= 2/mm.h similarity index 100% rename from xen/include/asm-arm/arm32/mm.h rename to xen/arch/arm/include/asm/arm32/mm.h diff --git a/xen/include/asm-arm/arm32/page.h b/xen/arch/arm/include/asm/ar= m32/page.h similarity index 100% rename from xen/include/asm-arm/arm32/page.h rename to xen/arch/arm/include/asm/arm32/page.h diff --git a/xen/include/asm-arm/arm32/processor.h b/xen/arch/arm/include/a= sm/arm32/processor.h similarity index 100% rename from xen/include/asm-arm/arm32/processor.h rename to xen/arch/arm/include/asm/arm32/processor.h diff --git a/xen/include/asm-arm/arm32/sysregs.h b/xen/arch/arm/include/asm= /arm32/sysregs.h similarity index 100% rename from xen/include/asm-arm/arm32/sysregs.h rename to xen/arch/arm/include/asm/arm32/sysregs.h diff --git a/xen/include/asm-arm/arm32/system.h b/xen/arch/arm/include/asm/= arm32/system.h similarity index 100% rename from xen/include/asm-arm/arm32/system.h rename to xen/arch/arm/include/asm/arm32/system.h diff --git a/xen/include/asm-arm/arm32/traps.h b/xen/arch/arm/include/asm/a= rm32/traps.h similarity index 100% rename from xen/include/asm-arm/arm32/traps.h rename to xen/arch/arm/include/asm/arm32/traps.h diff --git a/xen/include/asm-arm/arm32/vfp.h b/xen/arch/arm/include/asm/arm= 32/vfp.h similarity index 100% rename from xen/include/asm-arm/arm32/vfp.h rename to xen/arch/arm/include/asm/arm32/vfp.h diff --git a/xen/include/asm-arm/arm64/atomic.h b/xen/arch/arm/include/asm/= arm64/atomic.h similarity index 100% rename from xen/include/asm-arm/arm64/atomic.h rename to xen/arch/arm/include/asm/arm64/atomic.h diff --git a/xen/include/asm-arm/arm64/bitops.h b/xen/arch/arm/include/asm/= arm64/bitops.h similarity index 100% rename from xen/include/asm-arm/arm64/bitops.h rename to xen/arch/arm/include/asm/arm64/bitops.h diff --git a/xen/include/asm-arm/arm64/brk.h b/xen/arch/arm/include/asm/arm= 64/brk.h similarity index 100% rename from xen/include/asm-arm/arm64/brk.h rename to xen/arch/arm/include/asm/arm64/brk.h diff --git a/xen/include/asm-arm/arm64/bug.h b/xen/arch/arm/include/asm/arm= 64/bug.h similarity index 100% rename from xen/include/asm-arm/arm64/bug.h rename to xen/arch/arm/include/asm/arm64/bug.h diff --git a/xen/include/asm-arm/arm64/cmpxchg.h b/xen/arch/arm/include/asm= /arm64/cmpxchg.h similarity index 100% rename from xen/include/asm-arm/arm64/cmpxchg.h rename to xen/arch/arm/include/asm/arm64/cmpxchg.h diff --git a/xen/include/asm-arm/arm64/cpufeature.h b/xen/arch/arm/include/= asm/arm64/cpufeature.h similarity index 100% rename from xen/include/asm-arm/arm64/cpufeature.h rename to xen/arch/arm/include/asm/arm64/cpufeature.h diff --git a/xen/include/asm-arm/arm64/efibind.h b/xen/arch/arm/include/asm= /arm64/efibind.h similarity index 100% rename from xen/include/asm-arm/arm64/efibind.h rename to xen/arch/arm/include/asm/arm64/efibind.h diff --git a/xen/include/asm-arm/arm64/flushtlb.h b/xen/arch/arm/include/as= m/arm64/flushtlb.h similarity index 100% rename from xen/include/asm-arm/arm64/flushtlb.h rename to xen/arch/arm/include/asm/arm64/flushtlb.h diff --git a/xen/include/asm-arm/arm64/hsr.h b/xen/arch/arm/include/asm/arm= 64/hsr.h similarity index 100% rename from xen/include/asm-arm/arm64/hsr.h rename to xen/arch/arm/include/asm/arm64/hsr.h diff --git a/xen/include/asm-arm/arm64/insn.h b/xen/arch/arm/include/asm/ar= m64/insn.h similarity index 100% rename from xen/include/asm-arm/arm64/insn.h rename to xen/arch/arm/include/asm/arm64/insn.h diff --git a/xen/include/asm-arm/arm64/io.h b/xen/arch/arm/include/asm/arm6= 4/io.h similarity index 100% rename from xen/include/asm-arm/arm64/io.h rename to xen/arch/arm/include/asm/arm64/io.h diff --git a/xen/include/asm-arm/arm64/macros.h b/xen/arch/arm/include/asm/= arm64/macros.h similarity index 100% rename from xen/include/asm-arm/arm64/macros.h rename to xen/arch/arm/include/asm/arm64/macros.h diff --git a/xen/include/asm-arm/arm64/mm.h b/xen/arch/arm/include/asm/arm6= 4/mm.h similarity index 100% rename from xen/include/asm-arm/arm64/mm.h rename to xen/arch/arm/include/asm/arm64/mm.h diff --git a/xen/include/asm-arm/arm64/page.h b/xen/arch/arm/include/asm/ar= m64/page.h similarity index 100% rename from xen/include/asm-arm/arm64/page.h rename to xen/arch/arm/include/asm/arm64/page.h diff --git a/xen/include/asm-arm/arm64/processor.h b/xen/arch/arm/include/a= sm/arm64/processor.h similarity index 100% rename from xen/include/asm-arm/arm64/processor.h rename to xen/arch/arm/include/asm/arm64/processor.h diff --git a/xen/include/asm-arm/arm64/sysregs.h b/xen/arch/arm/include/asm= /arm64/sysregs.h similarity index 100% rename from xen/include/asm-arm/arm64/sysregs.h rename to xen/arch/arm/include/asm/arm64/sysregs.h diff --git a/xen/include/asm-arm/arm64/system.h b/xen/arch/arm/include/asm/= arm64/system.h similarity index 100% rename from xen/include/asm-arm/arm64/system.h rename to xen/arch/arm/include/asm/arm64/system.h diff --git a/xen/include/asm-arm/arm64/traps.h b/xen/arch/arm/include/asm/a= rm64/traps.h similarity index 100% rename from xen/include/asm-arm/arm64/traps.h rename to xen/arch/arm/include/asm/arm64/traps.h diff --git a/xen/include/asm-arm/arm64/vfp.h b/xen/arch/arm/include/asm/arm= 64/vfp.h similarity index 100% rename from xen/include/asm-arm/arm64/vfp.h rename to xen/arch/arm/include/asm/arm64/vfp.h diff --git a/xen/include/asm-arm/asm_defns.h b/xen/arch/arm/include/asm/asm= _defns.h similarity index 100% rename from xen/include/asm-arm/asm_defns.h rename to xen/arch/arm/include/asm/asm_defns.h diff --git a/xen/include/asm-arm/atomic.h b/xen/arch/arm/include/asm/atomic= .h similarity index 100% rename from xen/include/asm-arm/atomic.h rename to xen/arch/arm/include/asm/atomic.h diff --git a/xen/include/asm-arm/bitops.h b/xen/arch/arm/include/asm/bitops= .h similarity index 100% rename from xen/include/asm-arm/bitops.h rename to xen/arch/arm/include/asm/bitops.h diff --git a/xen/include/asm-arm/bug.h b/xen/arch/arm/include/asm/bug.h similarity index 100% rename from xen/include/asm-arm/bug.h rename to xen/arch/arm/include/asm/bug.h diff --git a/xen/include/asm-arm/byteorder.h b/xen/arch/arm/include/asm/byt= eorder.h similarity index 100% rename from xen/include/asm-arm/byteorder.h rename to xen/arch/arm/include/asm/byteorder.h diff --git a/xen/include/asm-arm/cache.h b/xen/arch/arm/include/asm/cache.h similarity index 100% rename from xen/include/asm-arm/cache.h rename to xen/arch/arm/include/asm/cache.h diff --git a/xen/include/asm-arm/cadence-uart.h b/xen/arch/arm/include/asm/= cadence-uart.h similarity index 100% rename from xen/include/asm-arm/cadence-uart.h rename to xen/arch/arm/include/asm/cadence-uart.h diff --git a/xen/include/asm-arm/config.h b/xen/arch/arm/include/asm/config= .h similarity index 100% rename from xen/include/asm-arm/config.h rename to xen/arch/arm/include/asm/config.h diff --git a/xen/include/asm-arm/cpregs.h b/xen/arch/arm/include/asm/cpregs= .h similarity index 100% rename from xen/include/asm-arm/cpregs.h rename to xen/arch/arm/include/asm/cpregs.h diff --git a/xen/include/asm-arm/cpuerrata.h b/xen/arch/arm/include/asm/cpu= errata.h similarity index 100% rename from xen/include/asm-arm/cpuerrata.h rename to xen/arch/arm/include/asm/cpuerrata.h diff --git a/xen/include/asm-arm/cpufeature.h b/xen/arch/arm/include/asm/cp= ufeature.h similarity index 100% rename from xen/include/asm-arm/cpufeature.h rename to xen/arch/arm/include/asm/cpufeature.h diff --git a/xen/include/asm-arm/current.h b/xen/arch/arm/include/asm/curre= nt.h similarity index 100% rename from xen/include/asm-arm/current.h rename to xen/arch/arm/include/asm/current.h diff --git a/xen/include/asm-arm/debugger.h b/xen/arch/arm/include/asm/debu= gger.h similarity index 100% rename from xen/include/asm-arm/debugger.h rename to xen/arch/arm/include/asm/debugger.h diff --git a/xen/include/asm-arm/delay.h b/xen/arch/arm/include/asm/delay.h similarity index 100% rename from xen/include/asm-arm/delay.h rename to xen/arch/arm/include/asm/delay.h diff --git a/xen/include/asm-arm/desc.h b/xen/arch/arm/include/asm/desc.h similarity index 100% rename from xen/include/asm-arm/desc.h rename to xen/arch/arm/include/asm/desc.h diff --git a/xen/include/asm-arm/device.h b/xen/arch/arm/include/asm/device= .h similarity index 100% rename from xen/include/asm-arm/device.h rename to xen/arch/arm/include/asm/device.h diff --git a/xen/include/asm-arm/div64.h b/xen/arch/arm/include/asm/div64.h similarity index 100% rename from xen/include/asm-arm/div64.h rename to xen/arch/arm/include/asm/div64.h diff --git a/xen/include/asm-arm/domain.h b/xen/arch/arm/include/asm/domain= .h similarity index 100% rename from xen/include/asm-arm/domain.h rename to xen/arch/arm/include/asm/domain.h diff --git a/xen/include/asm-arm/domain_build.h b/xen/arch/arm/include/asm/= domain_build.h similarity index 100% rename from xen/include/asm-arm/domain_build.h rename to xen/arch/arm/include/asm/domain_build.h diff --git a/xen/include/asm-arm/early_printk.h b/xen/arch/arm/include/asm/= early_printk.h similarity index 100% rename from xen/include/asm-arm/early_printk.h rename to xen/arch/arm/include/asm/early_printk.h diff --git a/xen/include/asm-arm/efibind.h b/xen/arch/arm/include/asm/efibi= nd.h similarity index 100% rename from xen/include/asm-arm/efibind.h rename to xen/arch/arm/include/asm/efibind.h diff --git a/xen/include/asm-arm/elf.h b/xen/arch/arm/include/asm/elf.h similarity index 100% rename from xen/include/asm-arm/elf.h rename to xen/arch/arm/include/asm/elf.h diff --git a/xen/include/asm-arm/event.h b/xen/arch/arm/include/asm/event.h similarity index 100% rename from xen/include/asm-arm/event.h rename to xen/arch/arm/include/asm/event.h diff --git a/xen/include/asm-arm/exynos4210-uart.h b/xen/arch/arm/include/a= sm/exynos4210-uart.h similarity index 100% rename from xen/include/asm-arm/exynos4210-uart.h rename to xen/arch/arm/include/asm/exynos4210-uart.h diff --git a/xen/include/asm-arm/flushtlb.h b/xen/arch/arm/include/asm/flus= htlb.h similarity index 100% rename from xen/include/asm-arm/flushtlb.h rename to xen/arch/arm/include/asm/flushtlb.h diff --git a/xen/include/asm-arm/gic.h b/xen/arch/arm/include/asm/gic.h similarity index 100% rename from xen/include/asm-arm/gic.h rename to xen/arch/arm/include/asm/gic.h diff --git a/xen/include/asm-arm/gic_v3_defs.h b/xen/arch/arm/include/asm/g= ic_v3_defs.h similarity index 100% rename from xen/include/asm-arm/gic_v3_defs.h rename to xen/arch/arm/include/asm/gic_v3_defs.h diff --git a/xen/include/asm-arm/gic_v3_its.h b/xen/arch/arm/include/asm/gi= c_v3_its.h similarity index 100% rename from xen/include/asm-arm/gic_v3_its.h rename to xen/arch/arm/include/asm/gic_v3_its.h diff --git a/xen/include/asm-arm/grant_table.h b/xen/arch/arm/include/asm/g= rant_table.h similarity index 100% rename from xen/include/asm-arm/grant_table.h rename to xen/arch/arm/include/asm/grant_table.h diff --git a/xen/include/asm-arm/guest_access.h b/xen/arch/arm/include/asm/= guest_access.h similarity index 100% rename from xen/include/asm-arm/guest_access.h rename to xen/arch/arm/include/asm/guest_access.h diff --git a/xen/include/asm-arm/guest_atomics.h b/xen/arch/arm/include/asm= /guest_atomics.h similarity index 100% rename from xen/include/asm-arm/guest_atomics.h rename to xen/arch/arm/include/asm/guest_atomics.h diff --git a/xen/include/asm-arm/guest_walk.h b/xen/arch/arm/include/asm/gu= est_walk.h similarity index 100% rename from xen/include/asm-arm/guest_walk.h rename to xen/arch/arm/include/asm/guest_walk.h diff --git a/xen/include/asm-arm/hardirq.h b/xen/arch/arm/include/asm/hardi= rq.h similarity index 100% rename from xen/include/asm-arm/hardirq.h rename to xen/arch/arm/include/asm/hardirq.h diff --git a/xen/include/asm-arm/hsr.h b/xen/arch/arm/include/asm/hsr.h similarity index 100% rename from xen/include/asm-arm/hsr.h rename to xen/arch/arm/include/asm/hsr.h diff --git a/xen/include/asm-arm/hypercall.h b/xen/arch/arm/include/asm/hyp= ercall.h similarity index 100% rename from xen/include/asm-arm/hypercall.h rename to xen/arch/arm/include/asm/hypercall.h diff --git a/xen/include/asm-arm/init.h b/xen/arch/arm/include/asm/init.h similarity index 100% rename from xen/include/asm-arm/init.h rename to xen/arch/arm/include/asm/init.h diff --git a/xen/include/asm-arm/insn.h b/xen/arch/arm/include/asm/insn.h similarity index 100% rename from xen/include/asm-arm/insn.h rename to xen/arch/arm/include/asm/insn.h diff --git a/xen/include/asm-arm/io.h b/xen/arch/arm/include/asm/io.h similarity index 100% rename from xen/include/asm-arm/io.h rename to xen/arch/arm/include/asm/io.h diff --git a/xen/include/asm-arm/iocap.h b/xen/arch/arm/include/asm/iocap.h similarity index 100% rename from xen/include/asm-arm/iocap.h rename to xen/arch/arm/include/asm/iocap.h diff --git a/xen/include/asm-arm/iommu.h b/xen/arch/arm/include/asm/iommu.h similarity index 100% rename from xen/include/asm-arm/iommu.h rename to xen/arch/arm/include/asm/iommu.h diff --git a/xen/include/asm-arm/iommu_fwspec.h b/xen/arch/arm/include/asm/= iommu_fwspec.h similarity index 100% rename from xen/include/asm-arm/iommu_fwspec.h rename to xen/arch/arm/include/asm/iommu_fwspec.h diff --git a/xen/include/asm-arm/ioreq.h b/xen/arch/arm/include/asm/ioreq.h similarity index 100% rename from xen/include/asm-arm/ioreq.h rename to xen/arch/arm/include/asm/ioreq.h diff --git a/xen/include/asm-arm/irq.h b/xen/arch/arm/include/asm/irq.h similarity index 100% rename from xen/include/asm-arm/irq.h rename to xen/arch/arm/include/asm/irq.h diff --git a/xen/include/asm-arm/kernel.h b/xen/arch/arm/include/asm/kernel= .h similarity index 100% rename from xen/include/asm-arm/kernel.h rename to xen/arch/arm/include/asm/kernel.h diff --git a/xen/include/asm-arm/livepatch.h b/xen/arch/arm/include/asm/liv= epatch.h similarity index 100% rename from xen/include/asm-arm/livepatch.h rename to xen/arch/arm/include/asm/livepatch.h diff --git a/xen/include/asm-arm/lpae.h b/xen/arch/arm/include/asm/lpae.h similarity index 100% rename from xen/include/asm-arm/lpae.h rename to xen/arch/arm/include/asm/lpae.h diff --git a/xen/include/asm-arm/macros.h b/xen/arch/arm/include/asm/macros= .h similarity index 100% rename from xen/include/asm-arm/macros.h rename to xen/arch/arm/include/asm/macros.h diff --git a/xen/include/asm-arm/mem_access.h b/xen/arch/arm/include/asm/me= m_access.h similarity index 100% rename from xen/include/asm-arm/mem_access.h rename to xen/arch/arm/include/asm/mem_access.h diff --git a/xen/include/asm-arm/mm.h b/xen/arch/arm/include/asm/mm.h similarity index 100% rename from xen/include/asm-arm/mm.h rename to xen/arch/arm/include/asm/mm.h diff --git a/xen/include/asm-arm/mmio.h b/xen/arch/arm/include/asm/mmio.h similarity index 100% rename from xen/include/asm-arm/mmio.h rename to xen/arch/arm/include/asm/mmio.h diff --git a/xen/include/asm-arm/monitor.h b/xen/arch/arm/include/asm/monit= or.h similarity index 100% rename from xen/include/asm-arm/monitor.h rename to xen/arch/arm/include/asm/monitor.h diff --git a/xen/include/asm-arm/new_vgic.h b/xen/arch/arm/include/asm/new_= vgic.h similarity index 100% rename from xen/include/asm-arm/new_vgic.h rename to xen/arch/arm/include/asm/new_vgic.h diff --git a/xen/include/asm-arm/nospec.h b/xen/arch/arm/include/asm/nospec= .h similarity index 100% rename from xen/include/asm-arm/nospec.h rename to xen/arch/arm/include/asm/nospec.h diff --git a/xen/include/asm-arm/numa.h b/xen/arch/arm/include/asm/numa.h similarity index 100% rename from xen/include/asm-arm/numa.h rename to xen/arch/arm/include/asm/numa.h diff --git a/xen/include/asm-arm/p2m.h b/xen/arch/arm/include/asm/p2m.h similarity index 100% rename from xen/include/asm-arm/p2m.h rename to xen/arch/arm/include/asm/p2m.h diff --git a/xen/include/asm-arm/page-bits.h b/xen/arch/arm/include/asm/pag= e-bits.h similarity index 100% rename from xen/include/asm-arm/page-bits.h rename to xen/arch/arm/include/asm/page-bits.h diff --git a/xen/include/asm-arm/page.h b/xen/arch/arm/include/asm/page.h similarity index 100% rename from xen/include/asm-arm/page.h rename to xen/arch/arm/include/asm/page.h diff --git a/xen/include/asm-arm/paging.h b/xen/arch/arm/include/asm/paging= .h similarity index 100% rename from xen/include/asm-arm/paging.h rename to xen/arch/arm/include/asm/paging.h diff --git a/xen/include/asm-arm/pci.h b/xen/arch/arm/include/asm/pci.h similarity index 100% rename from xen/include/asm-arm/pci.h rename to xen/arch/arm/include/asm/pci.h diff --git a/xen/include/asm-arm/percpu.h b/xen/arch/arm/include/asm/percpu= .h similarity index 100% rename from xen/include/asm-arm/percpu.h rename to xen/arch/arm/include/asm/percpu.h diff --git a/xen/include/asm-arm/perfc.h b/xen/arch/arm/include/asm/perfc.h similarity index 100% rename from xen/include/asm-arm/perfc.h rename to xen/arch/arm/include/asm/perfc.h diff --git a/xen/include/asm-arm/perfc_defn.h b/xen/arch/arm/include/asm/pe= rfc_defn.h similarity index 100% rename from xen/include/asm-arm/perfc_defn.h rename to xen/arch/arm/include/asm/perfc_defn.h diff --git a/xen/include/asm-arm/pl011-uart.h b/xen/arch/arm/include/asm/pl= 011-uart.h similarity index 100% rename from xen/include/asm-arm/pl011-uart.h rename to xen/arch/arm/include/asm/pl011-uart.h diff --git a/xen/include/asm-arm/platform.h b/xen/arch/arm/include/asm/plat= form.h similarity index 100% rename from xen/include/asm-arm/platform.h rename to xen/arch/arm/include/asm/platform.h diff --git a/xen/include/asm-arm/platforms/exynos5.h b/xen/arch/arm/include= /asm/platforms/exynos5.h similarity index 100% rename from xen/include/asm-arm/platforms/exynos5.h rename to xen/arch/arm/include/asm/platforms/exynos5.h diff --git a/xen/include/asm-arm/platforms/midway.h b/xen/arch/arm/include/= asm/platforms/midway.h similarity index 100% rename from xen/include/asm-arm/platforms/midway.h rename to xen/arch/arm/include/asm/platforms/midway.h diff --git a/xen/include/asm-arm/platforms/omap5.h b/xen/arch/arm/include/a= sm/platforms/omap5.h similarity index 100% rename from xen/include/asm-arm/platforms/omap5.h rename to xen/arch/arm/include/asm/platforms/omap5.h diff --git a/xen/include/asm-arm/platforms/vexpress.h b/xen/arch/arm/includ= e/asm/platforms/vexpress.h similarity index 100% rename from xen/include/asm-arm/platforms/vexpress.h rename to xen/arch/arm/include/asm/platforms/vexpress.h diff --git a/xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h b/xen/arch/= arm/include/asm/platforms/xilinx-zynqmp-eemi.h similarity index 100% rename from xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h rename to xen/arch/arm/include/asm/platforms/xilinx-zynqmp-eemi.h diff --git a/xen/include/asm-arm/processor.h b/xen/arch/arm/include/asm/pro= cessor.h similarity index 100% rename from xen/include/asm-arm/processor.h rename to xen/arch/arm/include/asm/processor.h diff --git a/xen/include/asm-arm/procinfo.h b/xen/arch/arm/include/asm/proc= info.h similarity index 100% rename from xen/include/asm-arm/procinfo.h rename to xen/arch/arm/include/asm/procinfo.h diff --git a/xen/include/asm-arm/psci.h b/xen/arch/arm/include/asm/psci.h similarity index 100% rename from xen/include/asm-arm/psci.h rename to xen/arch/arm/include/asm/psci.h diff --git a/xen/include/asm-arm/random.h b/xen/arch/arm/include/asm/random= .h similarity index 100% rename from xen/include/asm-arm/random.h rename to xen/arch/arm/include/asm/random.h diff --git a/xen/include/asm-arm/regs.h b/xen/arch/arm/include/asm/regs.h similarity index 100% rename from xen/include/asm-arm/regs.h rename to xen/arch/arm/include/asm/regs.h diff --git a/xen/include/asm-arm/scif-uart.h b/xen/arch/arm/include/asm/sci= f-uart.h similarity index 100% rename from xen/include/asm-arm/scif-uart.h rename to xen/arch/arm/include/asm/scif-uart.h diff --git a/xen/include/asm-arm/setup.h b/xen/arch/arm/include/asm/setup.h similarity index 100% rename from xen/include/asm-arm/setup.h rename to xen/arch/arm/include/asm/setup.h diff --git a/xen/include/asm-arm/short-desc.h b/xen/arch/arm/include/asm/sh= ort-desc.h similarity index 100% rename from xen/include/asm-arm/short-desc.h rename to xen/arch/arm/include/asm/short-desc.h diff --git a/xen/include/asm-arm/smccc.h b/xen/arch/arm/include/asm/smccc.h similarity index 100% rename from xen/include/asm-arm/smccc.h rename to xen/arch/arm/include/asm/smccc.h diff --git a/xen/include/asm-arm/smp.h b/xen/arch/arm/include/asm/smp.h similarity index 100% rename from xen/include/asm-arm/smp.h rename to xen/arch/arm/include/asm/smp.h diff --git a/xen/include/asm-arm/softirq.h b/xen/arch/arm/include/asm/softi= rq.h similarity index 100% rename from xen/include/asm-arm/softirq.h rename to xen/arch/arm/include/asm/softirq.h diff --git a/xen/include/asm-arm/spinlock.h b/xen/arch/arm/include/asm/spin= lock.h similarity index 100% rename from xen/include/asm-arm/spinlock.h rename to xen/arch/arm/include/asm/spinlock.h diff --git a/xen/include/asm-arm/string.h b/xen/arch/arm/include/asm/string= .h similarity index 100% rename from xen/include/asm-arm/string.h rename to xen/arch/arm/include/asm/string.h diff --git a/xen/include/asm-arm/sysregs.h b/xen/arch/arm/include/asm/sysre= gs.h similarity index 100% rename from xen/include/asm-arm/sysregs.h rename to xen/arch/arm/include/asm/sysregs.h diff --git a/xen/include/asm-arm/system.h b/xen/arch/arm/include/asm/system= .h similarity index 100% rename from xen/include/asm-arm/system.h rename to xen/arch/arm/include/asm/system.h diff --git a/xen/include/asm-arm/tee/optee_msg.h b/xen/arch/arm/include/asm= /tee/optee_msg.h similarity index 100% rename from xen/include/asm-arm/tee/optee_msg.h rename to xen/arch/arm/include/asm/tee/optee_msg.h diff --git a/xen/include/asm-arm/tee/optee_rpc_cmd.h b/xen/arch/arm/include= /asm/tee/optee_rpc_cmd.h similarity index 100% rename from xen/include/asm-arm/tee/optee_rpc_cmd.h rename to xen/arch/arm/include/asm/tee/optee_rpc_cmd.h diff --git a/xen/include/asm-arm/tee/optee_smc.h b/xen/arch/arm/include/asm= /tee/optee_smc.h similarity index 100% rename from xen/include/asm-arm/tee/optee_smc.h rename to xen/arch/arm/include/asm/tee/optee_smc.h diff --git a/xen/include/asm-arm/tee/tee.h b/xen/arch/arm/include/asm/tee/t= ee.h similarity index 100% rename from xen/include/asm-arm/tee/tee.h rename to xen/arch/arm/include/asm/tee/tee.h diff --git a/xen/include/asm-arm/time.h b/xen/arch/arm/include/asm/time.h similarity index 100% rename from xen/include/asm-arm/time.h rename to xen/arch/arm/include/asm/time.h diff --git a/xen/include/asm-arm/trace.h b/xen/arch/arm/include/asm/trace.h similarity index 100% rename from xen/include/asm-arm/trace.h rename to xen/arch/arm/include/asm/trace.h diff --git a/xen/include/asm-arm/traps.h b/xen/arch/arm/include/asm/traps.h similarity index 100% rename from xen/include/asm-arm/traps.h rename to xen/arch/arm/include/asm/traps.h diff --git a/xen/include/asm-arm/types.h b/xen/arch/arm/include/asm/types.h similarity index 100% rename from xen/include/asm-arm/types.h rename to xen/arch/arm/include/asm/types.h diff --git a/xen/include/asm-arm/vfp.h b/xen/arch/arm/include/asm/vfp.h similarity index 100% rename from xen/include/asm-arm/vfp.h rename to xen/arch/arm/include/asm/vfp.h diff --git a/xen/include/asm-arm/vgic-emul.h b/xen/arch/arm/include/asm/vgi= c-emul.h similarity index 100% rename from xen/include/asm-arm/vgic-emul.h rename to xen/arch/arm/include/asm/vgic-emul.h diff --git a/xen/include/asm-arm/vgic.h b/xen/arch/arm/include/asm/vgic.h similarity index 100% rename from xen/include/asm-arm/vgic.h rename to xen/arch/arm/include/asm/vgic.h diff --git a/xen/include/asm-arm/vm_event.h b/xen/arch/arm/include/asm/vm_e= vent.h similarity index 100% rename from xen/include/asm-arm/vm_event.h rename to xen/arch/arm/include/asm/vm_event.h diff --git a/xen/include/asm-arm/vpl011.h b/xen/arch/arm/include/asm/vpl011= .h similarity index 100% rename from xen/include/asm-arm/vpl011.h rename to xen/arch/arm/include/asm/vpl011.h diff --git a/xen/include/asm-arm/vpsci.h b/xen/arch/arm/include/asm/vpsci.h similarity index 100% rename from xen/include/asm-arm/vpsci.h rename to xen/arch/arm/include/asm/vpsci.h diff --git a/xen/include/asm-arm/vreg.h b/xen/arch/arm/include/asm/vreg.h similarity index 100% rename from xen/include/asm-arm/vreg.h rename to xen/arch/arm/include/asm/vreg.h diff --git a/xen/include/asm-arm/vtimer.h b/xen/arch/arm/include/asm/vtimer= .h similarity index 100% rename from xen/include/asm-arm/vtimer.h rename to xen/arch/arm/include/asm/vtimer.h diff --git a/xen/include/asm-arm/xenoprof.h b/xen/arch/arm/include/asm/xeno= prof.h similarity index 100% rename from xen/include/asm-arm/xenoprof.h rename to xen/arch/arm/include/asm/xenoprof.h diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c index 60c0e82fc559..7bfd0a73a7d2 100644 --- a/xen/arch/arm/smpboot.c +++ b/xen/arch/arm/smpboot.c @@ -46,7 +46,7 @@ struct cpuinfo_arm cpu_data[NR_CPUS]; /* CPU logical map: map xen cpuid to an MPIDR */ register_t __cpu_logical_map[NR_CPUS] =3D { [0 ... NR_CPUS-1] =3D MPIDR_IN= VALID }; =20 -/* Fake one node for now. See also include/asm-arm/numa.h */ +/* Fake one node for now. See also asm/numa.h */ nodemask_t __read_mostly node_online_map =3D { { [0] =3D 1UL } }; =20 /* Xen stack for bringing up the first CPU. */ diff --git a/xen/arch/arm/vpsci.c b/xen/arch/arm/vpsci.c index c1e250be5967..744d43ec2798 100644 --- a/xen/arch/arm/vpsci.c +++ b/xen/arch/arm/vpsci.c @@ -278,7 +278,7 @@ bool do_vpsci_0_1_call(struct cpu_user_regs *regs, uint= 32_t fid) bool do_vpsci_0_2_call(struct cpu_user_regs *regs, uint32_t fid) { /* - * /!\ VPSCI_NR_FUNCS (in asm-arm/vpsci.h) should be updated when + * /!\ VPSCI_NR_FUNCS (in asm/vpsci.h) should be updated when * adding/removing a function. SCCC_SMCCC_*_REVISION should be * updated once per release. */ diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index 53dadb897591..39ae6ffea94d 100644 --- a/xen/arch/riscv/arch.mk +++ b/xen/arch/riscv/arch.mk @@ -12,3 +12,4 @@ riscv-march-$(CONFIG_RISCV_ISA_C) :=3D $(riscv-marc= h-y)c =20 CFLAGS +=3D -march=3D$(riscv-march-y) -mstrict-align -mcmodel=3Dmedany CFLAGS +=3D -I$(BASEDIR)/include +CFLAGS +=3D -I$(BASEDIR)/arch/$(TARGET_ARCH)/include diff --git a/xen/include/asm-riscv/config.h b/xen/arch/riscv/include/asm/co= nfig.h similarity index 100% rename from xen/include/asm-riscv/config.h rename to xen/arch/riscv/include/asm/config.h diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 669e16e72690..8db4cb98edbb 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -273,11 +273,11 @@ efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86= /efi/built_in.o efi/buildid.o efi/relocs-dummy.o: ; =20 .PHONY: include -include: $(BASEDIR)/include/asm-x86/asm-macros.h +include: $(BASEDIR)/arch/x86/include/asm/asm-macros.h =20 asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P =20 -$(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i Makefile +$(BASEDIR)/arch/x86/include/asm/asm-macros.h: asm-macros.i Makefile echo '#if 0' >$@.new echo '.if 0' >>$@.new echo '#endif' >>$@.new @@ -304,7 +304,7 @@ efi/mkreloc: efi/mkreloc.c .PHONY: clean clean:: rm -f *.lds *.new boot/*.o boot/*~ boot/core boot/mkelf32 - rm -f asm-macros.i $(BASEDIR)/include/asm-x86/asm-macros.* + rm -f asm-macros.i $(BASEDIR)/arch/x86/include/asm/asm-macros.* rm -f $(BASEDIR)/.xen-syms.[0-9]* boot/.*.d $(BASEDIR)/.xen.elf32 rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi efi/mkreloc rm -f boot/cmdline.S boot/reloc.S boot/*.lnk boot/*.bin diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index ce0c1a0e7fb2..eea320e618b9 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -4,8 +4,9 @@ export XEN_IMG_OFFSET :=3D 0x200000 =20 CFLAGS +=3D -I$(BASEDIR)/include -CFLAGS +=3D -I$(BASEDIR)/include/asm-x86/mach-generic -CFLAGS +=3D -I$(BASEDIR)/include/asm-x86/mach-default +CFLAGS +=3D -I$(BASEDIR)/arch/$(TARGET_ARCH)/include +CFLAGS +=3D -I$(BASEDIR)/arch/x86/include/asm/mach-generic +CFLAGS +=3D -I$(BASEDIR)/arch/x86/include/asm/mach-default CFLAGS +=3D -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) =20 # Prevent floating-point variables from creeping into Xen. diff --git a/xen/include/asm-x86/acpi.h b/xen/arch/x86/include/asm/acpi.h similarity index 100% rename from xen/include/asm-x86/acpi.h rename to xen/arch/x86/include/asm/acpi.h diff --git a/xen/include/asm-x86/alternative-asm.h b/xen/arch/x86/include/a= sm/alternative-asm.h similarity index 100% rename from xen/include/asm-x86/alternative-asm.h rename to xen/arch/x86/include/asm/alternative-asm.h diff --git a/xen/include/asm-x86/alternative.h b/xen/arch/x86/include/asm/a= lternative.h similarity index 100% rename from xen/include/asm-x86/alternative.h rename to xen/arch/x86/include/asm/alternative.h diff --git a/xen/include/asm-x86/altp2m.h b/xen/arch/x86/include/asm/altp2m= .h similarity index 100% rename from xen/include/asm-x86/altp2m.h rename to xen/arch/x86/include/asm/altp2m.h diff --git a/xen/include/asm-x86/amd.h b/xen/arch/x86/include/asm/amd.h similarity index 100% rename from xen/include/asm-x86/amd.h rename to xen/arch/x86/include/asm/amd.h diff --git a/xen/include/asm-x86/apic.h b/xen/arch/x86/include/asm/apic.h similarity index 100% rename from xen/include/asm-x86/apic.h rename to xen/arch/x86/include/asm/apic.h diff --git a/xen/include/asm-x86/apicdef.h b/xen/arch/x86/include/asm/apicd= ef.h similarity index 100% rename from xen/include/asm-x86/apicdef.h rename to xen/arch/x86/include/asm/apicdef.h diff --git a/xen/include/asm-x86/asm-defns.h b/xen/arch/x86/include/asm/asm= -defns.h similarity index 100% rename from xen/include/asm-x86/asm-defns.h rename to xen/arch/x86/include/asm/asm-defns.h diff --git a/xen/include/asm-x86/asm_defns.h b/xen/arch/x86/include/asm/asm= _defns.h similarity index 100% rename from xen/include/asm-x86/asm_defns.h rename to xen/arch/x86/include/asm/asm_defns.h diff --git a/xen/include/asm-x86/atomic.h b/xen/arch/x86/include/asm/atomic= .h similarity index 100% rename from xen/include/asm-x86/atomic.h rename to xen/arch/x86/include/asm/atomic.h diff --git a/xen/include/asm-x86/bitops.h b/xen/arch/x86/include/asm/bitops= .h similarity index 100% rename from xen/include/asm-x86/bitops.h rename to xen/arch/x86/include/asm/bitops.h diff --git a/xen/include/asm-x86/bug.h b/xen/arch/x86/include/asm/bug.h similarity index 100% rename from xen/include/asm-x86/bug.h rename to xen/arch/x86/include/asm/bug.h diff --git a/xen/include/asm-x86/byteorder.h b/xen/arch/x86/include/asm/byt= eorder.h similarity index 100% rename from xen/include/asm-x86/byteorder.h rename to xen/arch/x86/include/asm/byteorder.h diff --git a/xen/include/asm-x86/bzimage.h b/xen/arch/x86/include/asm/bzima= ge.h similarity index 100% rename from xen/include/asm-x86/bzimage.h rename to xen/arch/x86/include/asm/bzimage.h diff --git a/xen/include/asm-x86/cache.h b/xen/arch/x86/include/asm/cache.h similarity index 100% rename from xen/include/asm-x86/cache.h rename to xen/arch/x86/include/asm/cache.h diff --git a/xen/include/asm-x86/compat.h b/xen/arch/x86/include/asm/compat= .h similarity index 100% rename from xen/include/asm-x86/compat.h rename to xen/arch/x86/include/asm/compat.h diff --git a/xen/include/asm-x86/config.h b/xen/arch/x86/include/asm/config= .h similarity index 100% rename from xen/include/asm-x86/config.h rename to xen/arch/x86/include/asm/config.h diff --git a/xen/include/asm-x86/cpufeature.h b/xen/arch/x86/include/asm/cp= ufeature.h similarity index 100% rename from xen/include/asm-x86/cpufeature.h rename to xen/arch/x86/include/asm/cpufeature.h diff --git a/xen/include/asm-x86/cpufeatures.h b/xen/arch/x86/include/asm/c= pufeatures.h similarity index 100% rename from xen/include/asm-x86/cpufeatures.h rename to xen/arch/x86/include/asm/cpufeatures.h diff --git a/xen/include/asm-x86/cpufeatureset.h b/xen/arch/x86/include/asm= /cpufeatureset.h similarity index 100% rename from xen/include/asm-x86/cpufeatureset.h rename to xen/arch/x86/include/asm/cpufeatureset.h diff --git a/xen/include/asm-x86/cpuid.h b/xen/arch/x86/include/asm/cpuid.h similarity index 100% rename from xen/include/asm-x86/cpuid.h rename to xen/arch/x86/include/asm/cpuid.h diff --git a/xen/include/asm-x86/cpuidle.h b/xen/arch/x86/include/asm/cpuid= le.h similarity index 100% rename from xen/include/asm-x86/cpuidle.h rename to xen/arch/x86/include/asm/cpuidle.h diff --git a/xen/include/asm-x86/current.h b/xen/arch/x86/include/asm/curre= nt.h similarity index 99% rename from xen/include/asm-x86/current.h rename to xen/arch/x86/include/asm/current.h index a74ad4bc4c44..cfbedc31983f 100644 --- a/xen/include/asm-x86/current.h +++ b/xen/arch/x86/include/asm/current.h @@ -53,7 +53,7 @@ struct cpu_info { unsigned long xen_cr3; unsigned long pv_cr3; =20 - /* See asm-x86/spec_ctrl_asm.h for usage. */ + /* See asm/spec_ctrl_asm.h for usage. */ unsigned int shadow_spec_ctrl; uint8_t xen_spec_ctrl; uint8_t spec_ctrl_flags; diff --git a/xen/include/asm-x86/debugger.h b/xen/arch/x86/include/asm/debu= gger.h similarity index 100% rename from xen/include/asm-x86/debugger.h rename to xen/arch/x86/include/asm/debugger.h diff --git a/xen/include/asm-x86/debugreg.h b/xen/arch/x86/include/asm/debu= greg.h similarity index 100% rename from xen/include/asm-x86/debugreg.h rename to xen/arch/x86/include/asm/debugreg.h diff --git a/xen/include/asm-x86/delay.h b/xen/arch/x86/include/asm/delay.h similarity index 100% rename from xen/include/asm-x86/delay.h rename to xen/arch/x86/include/asm/delay.h diff --git a/xen/include/asm-x86/desc.h b/xen/arch/x86/include/asm/desc.h similarity index 100% rename from xen/include/asm-x86/desc.h rename to xen/arch/x86/include/asm/desc.h diff --git a/xen/include/asm-x86/device.h b/xen/arch/x86/include/asm/device= .h similarity index 100% rename from xen/include/asm-x86/device.h rename to xen/arch/x86/include/asm/device.h diff --git a/xen/include/asm-x86/div64.h b/xen/arch/x86/include/asm/div64.h similarity index 100% rename from xen/include/asm-x86/div64.h rename to xen/arch/x86/include/asm/div64.h diff --git a/xen/include/asm-x86/dom0_build.h b/xen/arch/x86/include/asm/do= m0_build.h similarity index 100% rename from xen/include/asm-x86/dom0_build.h rename to xen/arch/x86/include/asm/dom0_build.h diff --git a/xen/include/asm-x86/domain.h b/xen/arch/x86/include/asm/domain= .h similarity index 99% rename from xen/include/asm-x86/domain.h rename to xen/arch/x86/include/asm/domain.h index 92d54de0b9a1..e62e10959801 100644 --- a/xen/include/asm-x86/domain.h +++ b/xen/arch/x86/include/asm/domain.h @@ -384,7 +384,7 @@ struct arch_domain struct PITState vpit; =20 /* TSC management (emulation, pv, scaling, stats) */ - int tsc_mode; /* see include/asm-x86/time.h */ + int tsc_mode; /* see asm/time.h */ bool_t vtsc; /* tsc is emulated (may change after migrate)= */ s_time_t vtsc_last; /* previous TSC value (guarantee monotonicity= ) */ uint64_t vtsc_offset; /* adjustment for save/restore/migrate */ diff --git a/xen/include/asm-x86/e820.h b/xen/arch/x86/include/asm/e820.h similarity index 100% rename from xen/include/asm-x86/e820.h rename to xen/arch/x86/include/asm/e820.h diff --git a/xen/include/asm-x86/edd.h b/xen/arch/x86/include/asm/edd.h similarity index 100% rename from xen/include/asm-x86/edd.h rename to xen/arch/x86/include/asm/edd.h diff --git a/xen/include/asm-x86/efibind.h b/xen/arch/x86/include/asm/efibi= nd.h similarity index 100% rename from xen/include/asm-x86/efibind.h rename to xen/arch/x86/include/asm/efibind.h diff --git a/xen/include/asm-x86/elf.h b/xen/arch/x86/include/asm/elf.h similarity index 100% rename from xen/include/asm-x86/elf.h rename to xen/arch/x86/include/asm/elf.h diff --git a/xen/include/asm-x86/event.h b/xen/arch/x86/include/asm/event.h similarity index 100% rename from xen/include/asm-x86/event.h rename to xen/arch/x86/include/asm/event.h diff --git a/xen/include/asm-x86/fixmap.h b/xen/arch/x86/include/asm/fixmap= .h similarity index 100% rename from xen/include/asm-x86/fixmap.h rename to xen/arch/x86/include/asm/fixmap.h diff --git a/xen/include/asm-x86/flushtlb.h b/xen/arch/x86/include/asm/flus= htlb.h similarity index 100% rename from xen/include/asm-x86/flushtlb.h rename to xen/arch/x86/include/asm/flushtlb.h diff --git a/xen/include/asm-x86/genapic.h b/xen/arch/x86/include/asm/genap= ic.h similarity index 100% rename from xen/include/asm-x86/genapic.h rename to xen/arch/x86/include/asm/genapic.h diff --git a/xen/include/asm-x86/grant_table.h b/xen/arch/x86/include/asm/g= rant_table.h similarity index 100% rename from xen/include/asm-x86/grant_table.h rename to xen/arch/x86/include/asm/grant_table.h diff --git a/xen/include/asm-x86/guest.h b/xen/arch/x86/include/asm/guest.h similarity index 100% rename from xen/include/asm-x86/guest.h rename to xen/arch/x86/include/asm/guest.h diff --git a/xen/include/asm-x86/guest/hyperv-hcall.h b/xen/arch/x86/includ= e/asm/guest/hyperv-hcall.h similarity index 100% rename from xen/include/asm-x86/guest/hyperv-hcall.h rename to xen/arch/x86/include/asm/guest/hyperv-hcall.h diff --git a/xen/include/asm-x86/guest/hyperv-tlfs.h b/xen/arch/x86/include= /asm/guest/hyperv-tlfs.h similarity index 100% rename from xen/include/asm-x86/guest/hyperv-tlfs.h rename to xen/arch/x86/include/asm/guest/hyperv-tlfs.h diff --git a/xen/include/asm-x86/guest/hyperv.h b/xen/arch/x86/include/asm/= guest/hyperv.h similarity index 100% rename from xen/include/asm-x86/guest/hyperv.h rename to xen/arch/x86/include/asm/guest/hyperv.h diff --git a/xen/include/asm-x86/guest/hypervisor.h b/xen/arch/x86/include/= asm/guest/hypervisor.h similarity index 100% rename from xen/include/asm-x86/guest/hypervisor.h rename to xen/arch/x86/include/asm/guest/hypervisor.h diff --git a/xen/include/asm-x86/guest/pvh-boot.h b/xen/arch/x86/include/as= m/guest/pvh-boot.h similarity index 100% rename from xen/include/asm-x86/guest/pvh-boot.h rename to xen/arch/x86/include/asm/guest/pvh-boot.h diff --git a/xen/include/asm-x86/guest/xen-hcall.h b/xen/arch/x86/include/a= sm/guest/xen-hcall.h similarity index 100% rename from xen/include/asm-x86/guest/xen-hcall.h rename to xen/arch/x86/include/asm/guest/xen-hcall.h diff --git a/xen/include/asm-x86/guest/xen.h b/xen/arch/x86/include/asm/gue= st/xen.h similarity index 100% rename from xen/include/asm-x86/guest/xen.h rename to xen/arch/x86/include/asm/guest/xen.h diff --git a/xen/include/asm-x86/guest_access.h b/xen/arch/x86/include/asm/= guest_access.h similarity index 100% rename from xen/include/asm-x86/guest_access.h rename to xen/arch/x86/include/asm/guest_access.h diff --git a/xen/include/asm-x86/guest_atomics.h b/xen/arch/x86/include/asm= /guest_atomics.h similarity index 100% rename from xen/include/asm-x86/guest_atomics.h rename to xen/arch/x86/include/asm/guest_atomics.h diff --git a/xen/include/asm-x86/guest_pt.h b/xen/arch/x86/include/asm/gues= t_pt.h similarity index 100% rename from xen/include/asm-x86/guest_pt.h rename to xen/arch/x86/include/asm/guest_pt.h diff --git a/xen/include/asm-x86/hap.h b/xen/arch/x86/include/asm/hap.h similarity index 100% rename from xen/include/asm-x86/hap.h rename to xen/arch/x86/include/asm/hap.h diff --git a/xen/include/asm-x86/hardirq.h b/xen/arch/x86/include/asm/hardi= rq.h similarity index 100% rename from xen/include/asm-x86/hardirq.h rename to xen/arch/x86/include/asm/hardirq.h diff --git a/xen/include/asm-x86/hpet.h b/xen/arch/x86/include/asm/hpet.h similarity index 100% rename from xen/include/asm-x86/hpet.h rename to xen/arch/x86/include/asm/hpet.h diff --git a/xen/include/asm-x86/hvm/asid.h b/xen/arch/x86/include/asm/hvm/= asid.h similarity index 100% rename from xen/include/asm-x86/hvm/asid.h rename to xen/arch/x86/include/asm/hvm/asid.h diff --git a/xen/include/asm-x86/hvm/cacheattr.h b/xen/arch/x86/include/asm= /hvm/cacheattr.h similarity index 100% rename from xen/include/asm-x86/hvm/cacheattr.h rename to xen/arch/x86/include/asm/hvm/cacheattr.h diff --git a/xen/include/asm-x86/hvm/domain.h b/xen/arch/x86/include/asm/hv= m/domain.h similarity index 100% rename from xen/include/asm-x86/hvm/domain.h rename to xen/arch/x86/include/asm/hvm/domain.h diff --git a/xen/include/asm-x86/hvm/emulate.h b/xen/arch/x86/include/asm/h= vm/emulate.h similarity index 100% rename from xen/include/asm-x86/hvm/emulate.h rename to xen/arch/x86/include/asm/hvm/emulate.h diff --git a/xen/include/asm-x86/hvm/grant_table.h b/xen/arch/x86/include/a= sm/hvm/grant_table.h similarity index 100% rename from xen/include/asm-x86/hvm/grant_table.h rename to xen/arch/x86/include/asm/hvm/grant_table.h diff --git a/xen/include/asm-x86/hvm/guest_access.h b/xen/arch/x86/include/= asm/hvm/guest_access.h similarity index 100% rename from xen/include/asm-x86/hvm/guest_access.h rename to xen/arch/x86/include/asm/hvm/guest_access.h diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/arch/x86/include/asm/hvm/h= vm.h similarity index 100% rename from xen/include/asm-x86/hvm/hvm.h rename to xen/arch/x86/include/asm/hvm/hvm.h diff --git a/xen/include/asm-x86/hvm/io.h b/xen/arch/x86/include/asm/hvm/io= .h similarity index 100% rename from xen/include/asm-x86/hvm/io.h rename to xen/arch/x86/include/asm/hvm/io.h diff --git a/xen/include/asm-x86/hvm/ioreq.h b/xen/arch/x86/include/asm/hvm= /ioreq.h similarity index 100% rename from xen/include/asm-x86/hvm/ioreq.h rename to xen/arch/x86/include/asm/hvm/ioreq.h diff --git a/xen/include/asm-x86/hvm/irq.h b/xen/arch/x86/include/asm/hvm/i= rq.h similarity index 100% rename from xen/include/asm-x86/hvm/irq.h rename to xen/arch/x86/include/asm/hvm/irq.h diff --git a/xen/include/asm-x86/hvm/monitor.h b/xen/arch/x86/include/asm/h= vm/monitor.h similarity index 100% rename from xen/include/asm-x86/hvm/monitor.h rename to xen/arch/x86/include/asm/hvm/monitor.h diff --git a/xen/include/asm-x86/hvm/nestedhvm.h b/xen/arch/x86/include/asm= /hvm/nestedhvm.h similarity index 100% rename from xen/include/asm-x86/hvm/nestedhvm.h rename to xen/arch/x86/include/asm/hvm/nestedhvm.h diff --git a/xen/include/asm-x86/hvm/save.h b/xen/arch/x86/include/asm/hvm/= save.h similarity index 100% rename from xen/include/asm-x86/hvm/save.h rename to xen/arch/x86/include/asm/hvm/save.h diff --git a/xen/include/asm-x86/hvm/support.h b/xen/arch/x86/include/asm/h= vm/support.h similarity index 100% rename from xen/include/asm-x86/hvm/support.h rename to xen/arch/x86/include/asm/hvm/support.h diff --git a/xen/include/asm-x86/hvm/svm/asid.h b/xen/arch/x86/include/asm/= hvm/svm/asid.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/asid.h rename to xen/arch/x86/include/asm/hvm/svm/asid.h diff --git a/xen/include/asm-x86/hvm/svm/emulate.h b/xen/arch/x86/include/a= sm/hvm/svm/emulate.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/emulate.h rename to xen/arch/x86/include/asm/hvm/svm/emulate.h diff --git a/xen/include/asm-x86/hvm/svm/intr.h b/xen/arch/x86/include/asm/= hvm/svm/intr.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/intr.h rename to xen/arch/x86/include/asm/hvm/svm/intr.h diff --git a/xen/include/asm-x86/hvm/svm/nestedsvm.h b/xen/arch/x86/include= /asm/hvm/svm/nestedsvm.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/nestedsvm.h rename to xen/arch/x86/include/asm/hvm/svm/nestedsvm.h diff --git a/xen/include/asm-x86/hvm/svm/svm.h b/xen/arch/x86/include/asm/h= vm/svm/svm.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/svm.h rename to xen/arch/x86/include/asm/hvm/svm/svm.h diff --git a/xen/include/asm-x86/hvm/svm/svmdebug.h b/xen/arch/x86/include/= asm/hvm/svm/svmdebug.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/svmdebug.h rename to xen/arch/x86/include/asm/hvm/svm/svmdebug.h diff --git a/xen/include/asm-x86/hvm/svm/vmcb.h b/xen/arch/x86/include/asm/= hvm/svm/vmcb.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/vmcb.h rename to xen/arch/x86/include/asm/hvm/svm/vmcb.h diff --git a/xen/include/asm-x86/hvm/trace.h b/xen/arch/x86/include/asm/hvm= /trace.h similarity index 100% rename from xen/include/asm-x86/hvm/trace.h rename to xen/arch/x86/include/asm/hvm/trace.h diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/arch/x86/include/asm/hvm/= vcpu.h similarity index 100% rename from xen/include/asm-x86/hvm/vcpu.h rename to xen/arch/x86/include/asm/hvm/vcpu.h diff --git a/xen/include/asm-x86/hvm/vioapic.h b/xen/arch/x86/include/asm/h= vm/vioapic.h similarity index 100% rename from xen/include/asm-x86/hvm/vioapic.h rename to xen/arch/x86/include/asm/hvm/vioapic.h diff --git a/xen/include/asm-x86/hvm/viridian.h b/xen/arch/x86/include/asm/= hvm/viridian.h similarity index 100% rename from xen/include/asm-x86/hvm/viridian.h rename to xen/arch/x86/include/asm/hvm/viridian.h diff --git a/xen/include/asm-x86/hvm/vlapic.h b/xen/arch/x86/include/asm/hv= m/vlapic.h similarity index 100% rename from xen/include/asm-x86/hvm/vlapic.h rename to xen/arch/x86/include/asm/hvm/vlapic.h diff --git a/xen/include/asm-x86/hvm/vm_event.h b/xen/arch/x86/include/asm/= hvm/vm_event.h similarity index 100% rename from xen/include/asm-x86/hvm/vm_event.h rename to xen/arch/x86/include/asm/hvm/vm_event.h diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/arch/x86/include/asm/= hvm/vmx/vmcs.h similarity index 100% rename from xen/include/asm-x86/hvm/vmx/vmcs.h rename to xen/arch/x86/include/asm/hvm/vmx/vmcs.h diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h b/xen/arch/x86/include/asm/h= vm/vmx/vmx.h similarity index 100% rename from xen/include/asm-x86/hvm/vmx/vmx.h rename to xen/arch/x86/include/asm/hvm/vmx/vmx.h diff --git a/xen/include/asm-x86/hvm/vmx/vvmx.h b/xen/arch/x86/include/asm/= hvm/vmx/vvmx.h similarity index 100% rename from xen/include/asm-x86/hvm/vmx/vvmx.h rename to xen/arch/x86/include/asm/hvm/vmx/vvmx.h diff --git a/xen/include/asm-x86/hvm/vpic.h b/xen/arch/x86/include/asm/hvm/= vpic.h similarity index 100% rename from xen/include/asm-x86/hvm/vpic.h rename to xen/arch/x86/include/asm/hvm/vpic.h diff --git a/xen/include/asm-x86/hvm/vpt.h b/xen/arch/x86/include/asm/hvm/v= pt.h similarity index 100% rename from xen/include/asm-x86/hvm/vpt.h rename to xen/arch/x86/include/asm/hvm/vpt.h diff --git a/xen/include/asm-x86/hypercall.h b/xen/arch/x86/include/asm/hyp= ercall.h similarity index 100% rename from xen/include/asm-x86/hypercall.h rename to xen/arch/x86/include/asm/hypercall.h diff --git a/xen/include/asm-x86/i387.h b/xen/arch/x86/include/asm/i387.h similarity index 100% rename from xen/include/asm-x86/i387.h rename to xen/arch/x86/include/asm/i387.h diff --git a/xen/include/asm-x86/init.h b/xen/arch/x86/include/asm/init.h similarity index 100% rename from xen/include/asm-x86/init.h rename to xen/arch/x86/include/asm/init.h diff --git a/xen/include/asm-x86/invpcid.h b/xen/arch/x86/include/asm/invpc= id.h similarity index 100% rename from xen/include/asm-x86/invpcid.h rename to xen/arch/x86/include/asm/invpcid.h diff --git a/xen/include/asm-x86/io.h b/xen/arch/x86/include/asm/io.h similarity index 100% rename from xen/include/asm-x86/io.h rename to xen/arch/x86/include/asm/io.h diff --git a/xen/include/asm-x86/io_apic.h b/xen/arch/x86/include/asm/io_ap= ic.h similarity index 100% rename from xen/include/asm-x86/io_apic.h rename to xen/arch/x86/include/asm/io_apic.h diff --git a/xen/include/asm-x86/iocap.h b/xen/arch/x86/include/asm/iocap.h similarity index 100% rename from xen/include/asm-x86/iocap.h rename to xen/arch/x86/include/asm/iocap.h diff --git a/xen/include/asm-x86/iommu.h b/xen/arch/x86/include/asm/iommu.h similarity index 100% rename from xen/include/asm-x86/iommu.h rename to xen/arch/x86/include/asm/iommu.h diff --git a/xen/include/asm-x86/ioreq.h b/xen/arch/x86/include/asm/ioreq.h similarity index 100% rename from xen/include/asm-x86/ioreq.h rename to xen/arch/x86/include/asm/ioreq.h diff --git a/xen/include/asm-x86/irq.h b/xen/arch/x86/include/asm/irq.h similarity index 100% rename from xen/include/asm-x86/irq.h rename to xen/arch/x86/include/asm/irq.h diff --git a/xen/include/asm-x86/ldt.h b/xen/arch/x86/include/asm/ldt.h similarity index 100% rename from xen/include/asm-x86/ldt.h rename to xen/arch/x86/include/asm/ldt.h diff --git a/xen/include/asm-x86/livepatch.h b/xen/arch/x86/include/asm/liv= epatch.h similarity index 100% rename from xen/include/asm-x86/livepatch.h rename to xen/arch/x86/include/asm/livepatch.h diff --git a/xen/include/asm-x86/mach-default/bios_ebda.h b/xen/arch/x86/in= clude/asm/mach-default/bios_ebda.h similarity index 100% rename from xen/include/asm-x86/mach-default/bios_ebda.h rename to xen/arch/x86/include/asm/mach-default/bios_ebda.h diff --git a/xen/include/asm-x86/mach-default/io_ports.h b/xen/arch/x86/inc= lude/asm/mach-default/io_ports.h similarity index 100% rename from xen/include/asm-x86/mach-default/io_ports.h rename to xen/arch/x86/include/asm/mach-default/io_ports.h diff --git a/xen/include/asm-x86/mach-default/irq_vectors.h b/xen/arch/x86/= include/asm/mach-default/irq_vectors.h similarity index 100% rename from xen/include/asm-x86/mach-default/irq_vectors.h rename to xen/arch/x86/include/asm/mach-default/irq_vectors.h diff --git a/xen/include/asm-x86/mach-default/mach_mpparse.h b/xen/arch/x86= /include/asm/mach-default/mach_mpparse.h similarity index 100% rename from xen/include/asm-x86/mach-default/mach_mpparse.h rename to xen/arch/x86/include/asm/mach-default/mach_mpparse.h diff --git a/xen/include/asm-x86/mach-default/mach_mpspec.h b/xen/arch/x86/= include/asm/mach-default/mach_mpspec.h similarity index 100% rename from xen/include/asm-x86/mach-default/mach_mpspec.h rename to xen/arch/x86/include/asm/mach-default/mach_mpspec.h diff --git a/xen/include/asm-x86/mach-generic/mach_apic.h b/xen/arch/x86/in= clude/asm/mach-generic/mach_apic.h similarity index 100% rename from xen/include/asm-x86/mach-generic/mach_apic.h rename to xen/arch/x86/include/asm/mach-generic/mach_apic.h diff --git a/xen/include/asm-x86/mach-generic/mach_mpparse.h b/xen/arch/x86= /include/asm/mach-generic/mach_mpparse.h similarity index 100% rename from xen/include/asm-x86/mach-generic/mach_mpparse.h rename to xen/arch/x86/include/asm/mach-generic/mach_mpparse.h diff --git a/xen/include/asm-x86/machine_kexec.h b/xen/arch/x86/include/asm= /machine_kexec.h similarity index 100% rename from xen/include/asm-x86/machine_kexec.h rename to xen/arch/x86/include/asm/machine_kexec.h diff --git a/xen/include/asm-x86/mc146818rtc.h b/xen/arch/x86/include/asm/m= c146818rtc.h similarity index 100% rename from xen/include/asm-x86/mc146818rtc.h rename to xen/arch/x86/include/asm/mc146818rtc.h diff --git a/xen/include/asm-x86/mce.h b/xen/arch/x86/include/asm/mce.h similarity index 100% rename from xen/include/asm-x86/mce.h rename to xen/arch/x86/include/asm/mce.h diff --git a/xen/include/asm-x86/mem_access.h b/xen/arch/x86/include/asm/me= m_access.h similarity index 100% rename from xen/include/asm-x86/mem_access.h rename to xen/arch/x86/include/asm/mem_access.h diff --git a/xen/include/asm-x86/mem_paging.h b/xen/arch/x86/include/asm/me= m_paging.h similarity index 100% rename from xen/include/asm-x86/mem_paging.h rename to xen/arch/x86/include/asm/mem_paging.h diff --git a/xen/include/asm-x86/mem_sharing.h b/xen/arch/x86/include/asm/m= em_sharing.h similarity index 100% rename from xen/include/asm-x86/mem_sharing.h rename to xen/arch/x86/include/asm/mem_sharing.h diff --git a/xen/include/asm-x86/microcode.h b/xen/arch/x86/include/asm/mic= rocode.h similarity index 100% rename from xen/include/asm-x86/microcode.h rename to xen/arch/x86/include/asm/microcode.h diff --git a/xen/include/asm-x86/mm.h b/xen/arch/x86/include/asm/mm.h similarity index 100% rename from xen/include/asm-x86/mm.h rename to xen/arch/x86/include/asm/mm.h diff --git a/xen/include/asm-x86/monitor.h b/xen/arch/x86/include/asm/monit= or.h similarity index 100% rename from xen/include/asm-x86/monitor.h rename to xen/arch/x86/include/asm/monitor.h diff --git a/xen/include/asm-x86/mpspec.h b/xen/arch/x86/include/asm/mpspec= .h similarity index 100% rename from xen/include/asm-x86/mpspec.h rename to xen/arch/x86/include/asm/mpspec.h diff --git a/xen/include/asm-x86/mpspec_def.h b/xen/arch/x86/include/asm/mp= spec_def.h similarity index 100% rename from xen/include/asm-x86/mpspec_def.h rename to xen/arch/x86/include/asm/mpspec_def.h diff --git a/xen/include/asm-x86/msi.h b/xen/arch/x86/include/asm/msi.h similarity index 100% rename from xen/include/asm-x86/msi.h rename to xen/arch/x86/include/asm/msi.h diff --git a/xen/include/asm-x86/msr-index.h b/xen/arch/x86/include/asm/msr= -index.h similarity index 100% rename from xen/include/asm-x86/msr-index.h rename to xen/arch/x86/include/asm/msr-index.h diff --git a/xen/include/asm-x86/msr.h b/xen/arch/x86/include/asm/msr.h similarity index 100% rename from xen/include/asm-x86/msr.h rename to xen/arch/x86/include/asm/msr.h diff --git a/xen/include/asm-x86/mtrr.h b/xen/arch/x86/include/asm/mtrr.h similarity index 100% rename from xen/include/asm-x86/mtrr.h rename to xen/arch/x86/include/asm/mtrr.h diff --git a/xen/include/asm-x86/multicall.h b/xen/arch/x86/include/asm/mul= ticall.h similarity index 100% rename from xen/include/asm-x86/multicall.h rename to xen/arch/x86/include/asm/multicall.h diff --git a/xen/include/asm-x86/mwait.h b/xen/arch/x86/include/asm/mwait.h similarity index 100% rename from xen/include/asm-x86/mwait.h rename to xen/arch/x86/include/asm/mwait.h diff --git a/xen/include/asm-x86/nmi.h b/xen/arch/x86/include/asm/nmi.h similarity index 100% rename from xen/include/asm-x86/nmi.h rename to xen/arch/x86/include/asm/nmi.h diff --git a/xen/include/asm-x86/nops.h b/xen/arch/x86/include/asm/nops.h similarity index 100% rename from xen/include/asm-x86/nops.h rename to xen/arch/x86/include/asm/nops.h diff --git a/xen/include/asm-x86/nospec.h b/xen/arch/x86/include/asm/nospec= .h similarity index 100% rename from xen/include/asm-x86/nospec.h rename to xen/arch/x86/include/asm/nospec.h diff --git a/xen/include/asm-x86/numa.h b/xen/arch/x86/include/asm/numa.h similarity index 100% rename from xen/include/asm-x86/numa.h rename to xen/arch/x86/include/asm/numa.h diff --git a/xen/include/asm-x86/p2m.h b/xen/arch/x86/include/asm/p2m.h similarity index 100% rename from xen/include/asm-x86/p2m.h rename to xen/arch/x86/include/asm/p2m.h diff --git a/xen/include/asm-x86/page-bits.h b/xen/arch/x86/include/asm/pag= e-bits.h similarity index 100% rename from xen/include/asm-x86/page-bits.h rename to xen/arch/x86/include/asm/page-bits.h diff --git a/xen/include/asm-x86/page.h b/xen/arch/x86/include/asm/page.h similarity index 100% rename from xen/include/asm-x86/page.h rename to xen/arch/x86/include/asm/page.h diff --git a/xen/include/asm-x86/paging.h b/xen/arch/x86/include/asm/paging= .h similarity index 100% rename from xen/include/asm-x86/paging.h rename to xen/arch/x86/include/asm/paging.h diff --git a/xen/include/asm-x86/pci.h b/xen/arch/x86/include/asm/pci.h similarity index 100% rename from xen/include/asm-x86/pci.h rename to xen/arch/x86/include/asm/pci.h diff --git a/xen/include/asm-x86/percpu.h b/xen/arch/x86/include/asm/percpu= .h similarity index 100% rename from xen/include/asm-x86/percpu.h rename to xen/arch/x86/include/asm/percpu.h diff --git a/xen/include/asm-x86/perfc.h b/xen/arch/x86/include/asm/perfc.h similarity index 100% rename from xen/include/asm-x86/perfc.h rename to xen/arch/x86/include/asm/perfc.h diff --git a/xen/include/asm-x86/perfc_defn.h b/xen/arch/x86/include/asm/pe= rfc_defn.h similarity index 100% rename from xen/include/asm-x86/perfc_defn.h rename to xen/arch/x86/include/asm/perfc_defn.h diff --git a/xen/include/asm-x86/processor.h b/xen/arch/x86/include/asm/pro= cessor.h similarity index 100% rename from xen/include/asm-x86/processor.h rename to xen/arch/x86/include/asm/processor.h diff --git a/xen/include/asm-x86/psr.h b/xen/arch/x86/include/asm/psr.h similarity index 100% rename from xen/include/asm-x86/psr.h rename to xen/arch/x86/include/asm/psr.h diff --git a/xen/include/asm-x86/pv/domain.h b/xen/arch/x86/include/asm/pv/= domain.h similarity index 100% rename from xen/include/asm-x86/pv/domain.h rename to xen/arch/x86/include/asm/pv/domain.h diff --git a/xen/include/asm-x86/pv/grant_table.h b/xen/arch/x86/include/as= m/pv/grant_table.h similarity index 100% rename from xen/include/asm-x86/pv/grant_table.h rename to xen/arch/x86/include/asm/pv/grant_table.h diff --git a/xen/include/asm-x86/pv/mm.h b/xen/arch/x86/include/asm/pv/mm.h similarity index 100% rename from xen/include/asm-x86/pv/mm.h rename to xen/arch/x86/include/asm/pv/mm.h diff --git a/xen/include/asm-x86/pv/shim.h b/xen/arch/x86/include/asm/pv/sh= im.h similarity index 100% rename from xen/include/asm-x86/pv/shim.h rename to xen/arch/x86/include/asm/pv/shim.h diff --git a/xen/include/asm-x86/pv/trace.h b/xen/arch/x86/include/asm/pv/t= race.h similarity index 100% rename from xen/include/asm-x86/pv/trace.h rename to xen/arch/x86/include/asm/pv/trace.h diff --git a/xen/include/asm-x86/pv/traps.h b/xen/arch/x86/include/asm/pv/t= raps.h similarity index 100% rename from xen/include/asm-x86/pv/traps.h rename to xen/arch/x86/include/asm/pv/traps.h diff --git a/xen/include/asm-x86/random.h b/xen/arch/x86/include/asm/random= .h similarity index 100% rename from xen/include/asm-x86/random.h rename to xen/arch/x86/include/asm/random.h diff --git a/xen/include/asm-x86/regs.h b/xen/arch/x86/include/asm/regs.h similarity index 100% rename from xen/include/asm-x86/regs.h rename to xen/arch/x86/include/asm/regs.h diff --git a/xen/include/asm-x86/setup.h b/xen/arch/x86/include/asm/setup.h similarity index 100% rename from xen/include/asm-x86/setup.h rename to xen/arch/x86/include/asm/setup.h diff --git a/xen/include/asm-x86/shadow.h b/xen/arch/x86/include/asm/shadow= .h similarity index 100% rename from xen/include/asm-x86/shadow.h rename to xen/arch/x86/include/asm/shadow.h diff --git a/xen/include/asm-x86/shared.h b/xen/arch/x86/include/asm/shared= .h similarity index 100% rename from xen/include/asm-x86/shared.h rename to xen/arch/x86/include/asm/shared.h diff --git a/xen/include/asm-x86/smp.h b/xen/arch/x86/include/asm/smp.h similarity index 100% rename from xen/include/asm-x86/smp.h rename to xen/arch/x86/include/asm/smp.h diff --git a/xen/include/asm-x86/softirq.h b/xen/arch/x86/include/asm/softi= rq.h similarity index 100% rename from xen/include/asm-x86/softirq.h rename to xen/arch/x86/include/asm/softirq.h diff --git a/xen/include/asm-x86/spec_ctrl.h b/xen/arch/x86/include/asm/spe= c_ctrl.h similarity index 100% rename from xen/include/asm-x86/spec_ctrl.h rename to xen/arch/x86/include/asm/spec_ctrl.h diff --git a/xen/include/asm-x86/spec_ctrl_asm.h b/xen/arch/x86/include/asm= /spec_ctrl_asm.h similarity index 100% rename from xen/include/asm-x86/spec_ctrl_asm.h rename to xen/arch/x86/include/asm/spec_ctrl_asm.h diff --git a/xen/include/asm-x86/spinlock.h b/xen/arch/x86/include/asm/spin= lock.h similarity index 100% rename from xen/include/asm-x86/spinlock.h rename to xen/arch/x86/include/asm/spinlock.h diff --git a/xen/include/asm-x86/string.h b/xen/arch/x86/include/asm/string= .h similarity index 100% rename from xen/include/asm-x86/string.h rename to xen/arch/x86/include/asm/string.h diff --git a/xen/include/asm-x86/system.h b/xen/arch/x86/include/asm/system= .h similarity index 100% rename from xen/include/asm-x86/system.h rename to xen/arch/x86/include/asm/system.h diff --git a/xen/include/asm-x86/tboot.h b/xen/arch/x86/include/asm/tboot.h similarity index 100% rename from xen/include/asm-x86/tboot.h rename to xen/arch/x86/include/asm/tboot.h diff --git a/xen/include/asm-x86/time.h b/xen/arch/x86/include/asm/time.h similarity index 100% rename from xen/include/asm-x86/time.h rename to xen/arch/x86/include/asm/time.h diff --git a/xen/include/asm-x86/trace.h b/xen/arch/x86/include/asm/trace.h similarity index 100% rename from xen/include/asm-x86/trace.h rename to xen/arch/x86/include/asm/trace.h diff --git a/xen/include/asm-x86/traps.h b/xen/arch/x86/include/asm/traps.h similarity index 100% rename from xen/include/asm-x86/traps.h rename to xen/arch/x86/include/asm/traps.h diff --git a/xen/include/asm-x86/types.h b/xen/arch/x86/include/asm/types.h similarity index 100% rename from xen/include/asm-x86/types.h rename to xen/arch/x86/include/asm/types.h diff --git a/xen/include/asm-x86/uaccess.h b/xen/arch/x86/include/asm/uacce= ss.h similarity index 100% rename from xen/include/asm-x86/uaccess.h rename to xen/arch/x86/include/asm/uaccess.h diff --git a/xen/include/asm-x86/unaligned.h b/xen/arch/x86/include/asm/una= ligned.h similarity index 100% rename from xen/include/asm-x86/unaligned.h rename to xen/arch/x86/include/asm/unaligned.h diff --git a/xen/include/asm-x86/vm_event.h b/xen/arch/x86/include/asm/vm_e= vent.h similarity index 100% rename from xen/include/asm-x86/vm_event.h rename to xen/arch/x86/include/asm/vm_event.h diff --git a/xen/include/asm-x86/vpmu.h b/xen/arch/x86/include/asm/vpmu.h similarity index 100% rename from xen/include/asm-x86/vpmu.h rename to xen/arch/x86/include/asm/vpmu.h diff --git a/xen/include/asm-x86/x86-defns.h b/xen/arch/x86/include/asm/x86= -defns.h similarity index 100% rename from xen/include/asm-x86/x86-defns.h rename to xen/arch/x86/include/asm/x86-defns.h diff --git a/xen/include/asm-x86/x86-vendors.h b/xen/arch/x86/include/asm/x= 86-vendors.h similarity index 100% rename from xen/include/asm-x86/x86-vendors.h rename to xen/arch/x86/include/asm/x86-vendors.h diff --git a/xen/include/asm-x86/x86_64/efibind.h b/xen/arch/x86/include/as= m/x86_64/efibind.h similarity index 100% rename from xen/include/asm-x86/x86_64/efibind.h rename to xen/arch/x86/include/asm/x86_64/efibind.h diff --git a/xen/include/asm-x86/x86_64/elf.h b/xen/arch/x86/include/asm/x8= 6_64/elf.h similarity index 100% rename from xen/include/asm-x86/x86_64/elf.h rename to xen/arch/x86/include/asm/x86_64/elf.h diff --git a/xen/include/asm-x86/x86_64/page.h b/xen/arch/x86/include/asm/x= 86_64/page.h similarity index 100% rename from xen/include/asm-x86/x86_64/page.h rename to xen/arch/x86/include/asm/x86_64/page.h diff --git a/xen/include/asm-x86/x86_64/regs.h b/xen/arch/x86/include/asm/x= 86_64/regs.h similarity index 100% rename from xen/include/asm-x86/x86_64/regs.h rename to xen/arch/x86/include/asm/x86_64/regs.h diff --git a/xen/include/asm-x86/x86_64/system.h b/xen/arch/x86/include/asm= /x86_64/system.h similarity index 100% rename from xen/include/asm-x86/x86_64/system.h rename to xen/arch/x86/include/asm/x86_64/system.h diff --git a/xen/include/asm-x86/x86_64/uaccess.h b/xen/arch/x86/include/as= m/x86_64/uaccess.h similarity index 100% rename from xen/include/asm-x86/x86_64/uaccess.h rename to xen/arch/x86/include/asm/x86_64/uaccess.h diff --git a/xen/include/asm-x86/x86_emulate.h b/xen/arch/x86/include/asm/x= 86_emulate.h similarity index 89% rename from xen/include/asm-x86/x86_emulate.h rename to xen/arch/x86/include/asm/x86_emulate.h index 9125807e24fa..c184c0053c93 100644 --- a/xen/include/asm-x86/x86_emulate.h +++ b/xen/arch/x86/include/asm/x86_emulate.h @@ -16,6 +16,6 @@ #include #include =20 -#include "../../arch/x86/x86_emulate/x86_emulate.h" +#include "../../x86_emulate/x86_emulate.h" =20 #endif /* __ASM_X86_X86_EMULATE_H__ */ diff --git a/xen/include/asm-x86/xenoprof.h b/xen/arch/x86/include/asm/xeno= prof.h similarity index 100% rename from xen/include/asm-x86/xenoprof.h rename to xen/arch/x86/include/asm/xenoprof.h diff --git a/xen/include/asm-x86/xstate.h b/xen/arch/x86/include/asm/xstate= .h similarity index 100% rename from xen/include/asm-x86/xstate.h rename to xen/arch/x86/include/asm/xstate.h diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c index d2fdc28df3e0..541e462d961d 100644 --- a/xen/common/efi/runtime.c +++ b/xen/common/efi/runtime.c @@ -12,7 +12,7 @@ struct efi_rs_state { #ifdef CONFIG_X86 /* * The way stacks get set up leads to them always being on an 8-byte - * boundary not evenly divisible by 16 (see asm-x86/current.h). The EFI A= BI, + * boundary not evenly divisible by 16 (see asm/current.h). The EFI ABI, * just like the CPU one, however requires stacks to be 16-byte aligned * before every function call. Since the compiler assumes this (unless * passing it -mpreferred-stack-boundary=3D3), it wouldn't generate code = to diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index d0baaa2ecd20..653f1ab09f63 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -245,7 +245,7 @@ PAGE_LIST_HEAD(page_broken_list); =20 /* * first_valid_mfn is exported because it is use in ARM specific NUMA - * helpers. See comment in asm-arm/numa.h. + * helpers. See comment in arch/arm/include/asm/numa.h. */ mfn_t first_valid_mfn =3D INVALID_MFN_INITIALIZER; =20 diff --git a/xen/include/xen/acpi.h b/xen/include/xen/acpi.h index 088c238a504a..08834f140266 100644 --- a/xen/include/xen/acpi.h +++ b/xen/include/xen/acpi.h @@ -40,8 +40,9 @@ #define ACPI_MADT_GET_TRIGGER(inti) ACPI_MADT_GET_(TRIGGER, inti) =20 /* - * Fixmap pages to reserve for ACPI boot-time tables (see asm-x86/fixmap.h= or - * asm-arm/config.h, 64 pages(256KB) is large enough for most cases.) + * Fixmap pages to reserve for ACPI boot-time tables (see + * arch/x86/include/asm/fixmap.h or arch/arm/include/asm/config.h, + * 64 pages(256KB) is large enough for most cases.) */ #define NUM_FIXMAP_ACPI_PAGES 64 =20 diff --git a/xen/include/xen/bitmap.h b/xen/include/xen/bitmap.h index e9175ab54a59..3caf92c76d6d 100644 --- a/xen/include/xen/bitmap.h +++ b/xen/include/xen/bitmap.h @@ -14,7 +14,7 @@ * * Function implementations generic to all architectures are in * lib/bitmap.c. Functions implementations that are architecture - * specific are in various include/asm-/bitops.h headers + * specific are in various asm/bitops.h headers * and other arch/ specific files. * * See lib/bitmap.c for more details. --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637847654; cv=none; d=zohomail.com; s=zohoarc; b=c3rlrSuuwy5uTJ3UdlQfOWUXk96K7Nl37ww4XHATdIdsSH6mscIPRByHgoXHvzrFSL3P1IBnG9B5+iTyO2TWDtQb4VTdIx1xoQoFObVROrMvf6Iu6nZH9kSBdieHBflvqFHx4KPK+MAjAwxZQZZHd8F3FQsIwQ2/HxFdlH0IuNU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847654; 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=r2hH6N9Mg2dNenpQ0cplaZimfw4joDCJHildNBCu7JY=; b=dx7J/hmjAAK6on++F/Aify1QIocFZdZL9nfIBCzIY1fU8pm8RwiZCMjH/xs5ABdK5TN2LsWI5h8aRAl2/wd+tHpPdRjE2gfT2nTycKViwppBR62JdHNKcxXBZ7YDlGnpJ88Iiapvo8pGXTwoa+xbLdoBtajM7HFnxXSIwHX1XyI= 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 1637847654115774.4936565488674; Thu, 25 Nov 2021 05:40:54 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231210.399968 (Exim 4.92) (envelope-from ) id 1mqEzO-0008IU-My; Thu, 25 Nov 2021 13:40:38 +0000 Received: by outflank-mailman (output) from mailman id 231210.399968; Thu, 25 Nov 2021 13:40:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqEzO-0008Hg-I5; Thu, 25 Nov 2021 13:40:38 +0000 Received: by outflank-mailman (input) for mailman id 231210; Thu, 25 Nov 2021 13:40:36 +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 1mqEzL-00076i-UX for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:36 +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 4191a2af-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:40:32 +0100 (CET) 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: 4191a2af-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847631; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z/WT05OcUodD6RGHso4Z+Hq1+po51KMdUGAn2O0jpV0=; b=ZAWq4EeOVIDRUbEy/7i8b2gPliM3P9NeUvJsDZUs/QFNLvxEFjelb/FK 21vZ8hahXpuLKF+mM/qJPB6F5/YTVaERNFHLZKv9PwKK3FbS1fg6bzhxG aR3ufZGAzWWdg2cpPwJGJyVzgQOxM/Icpv0NuCj/rvP8n4bV9gWFsNsce o=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: NlgjfJW98Grgo79rJFB0j2lKZZP6pmsV+RhUwPF+L98C7ubzhJyURbNM6dJdFn456UacZ7oSAK YDQPfh0Yb2XLMPDLKXBz7dErIdLCPeQT/PQ/nr8cbvbuzgg1vEGyjrsQLPWFbiXpVOH1qapvJM X/QiDCeYkt27L85Mmht/i03S+Vg3HC/Lo3blZ51Mxukg4Bz1U3AcDLa9CiQBEHBIcUbgCzmzRY 3Xeqt077mdRoE4AeLmX5zdyumWmSRpTlYpxDf49x6jc3ZfkB5bJyu7XU/kTvBlLP1t+1Ug54Oe fGjd9J2R0Lv+8Ce2cZl06MYW X-SBRS: 5.1 X-MesageID: 58576636 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:g0YqoqJe7reD1XSsFE+RVZIlxSXFcZb7ZxGr2PjKsXjdYENS0mQAy TRKD2iPbKmJYDb1Lo8gPYy39BxVvcPUmtE2SlBlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUZUideSc+EH140Es5xrZj6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB2gmIgo7 fRxlKfrRDkABaLlwOsMTERXRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsFlgNgjK8/6epsSoHh6wRnSDOo8QICFSKLPjTNd9Gpg258QQ62AD yYfQRwyfC/YPgRKAGgsFI0Ot7erxULicwQN/Tp5ooJoujOOnWSdyoPFMsfRe9GMbdVYmACfv G2u13/iHhgQ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9 tNMuJf/ug== IronPort-HdrOrdr: A9a23:SqegZq2JElQSNMSfjakpKgqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58576636" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 03/47] build: generate "include/xen/compile.h" with if_changed Date: Thu, 25 Nov 2021 13:39:22 +0000 Message-ID: <20211125134006.1076646-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847656338100005 Content-Type: text/plain; charset="utf-8" This will avoid regenerating "compile.h" if the content hasn't changed. As it's currently the case, the file isn't regenerated during `sudo make install` if it exist and does belong to a different user, thus we can remove the target "delete-unfresh-files". Target "$(TARGET)" still need a phony dependency, so add "FORCE". Use "$(dot-target).tmp" as temporary file as this is already cover by ".*.tmp" partern in ".gitconfig". Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v8: - drop change in .gitignore =20 v7: - Use $(if_changed,) instead of importing a new macro from Linux (filechk). - use $(dot-target).tmp as temporary file, that way is hiden, and already cover by .gitignore via ".*.tmp". (filechk was doing the same) - update .gitignore. xen/Makefile | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index b2a63edca1eb..2ad7da7ad67b 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -365,7 +365,7 @@ _debug: $(OBJDUMP) -D -S $(TARGET)-syms > $(TARGET).s =20 .PHONY: _clean -_clean: delete-unfresh-files +_clean: $(MAKE) -C tools clean $(MAKE) $(clean) include $(MAKE) $(clean) common @@ -383,7 +383,7 @@ _clean: delete-unfresh-files -o -name "*.gcno" -o -name ".*.cmd" -o -name "lib.a" \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map *~ core rm -f asm-offsets.s arch/*/include/asm/asm-offsets.h - rm -f .banner .allconfig.tmp + rm -f .banner .allconfig.tmp include/xen/compile.h =20 .PHONY: _distclean _distclean: clean @@ -393,7 +393,7 @@ $(TARGET).gz: $(TARGET) gzip -n -f -9 < $< > $@.new mv $@.new $@ =20 -$(TARGET): delete-unfresh-files +$(TARGET): FORCE $(MAKE) -C tools $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch])= ; \ @@ -406,14 +406,6 @@ $(TARGET): delete-unfresh-files $(MAKE) -f $(BASEDIR)/Rules.mk arch/$(TARGET_ARCH)/include/asm/asm-offset= s.h $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ =20 -# drivers/char/console.o contains static banner/compile info. Blow it away. -# Don't refresh these files during e.g., 'sudo make install' -.PHONY: delete-unfresh-files -delete-unfresh-files: - @if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \ - rm -f include/xen/compile.h; \ - fi - quiet_cmd_banner =3D BANNER $@ define cmd_banner if which figlet >/dev/null 2>&1 ; then \ @@ -428,9 +420,11 @@ endef $(call if_changed,banner) targets +=3D .banner =20 -# compile.h contains dynamic build info. Rebuilt on every 'make' invocatio= n. -include/xen/compile.h: include/xen/compile.h.in .banner - @sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \ +# Don't refresh this files during e.g., 'sudo make install' +quiet_cmd_compile.h =3D UPD $@ +define cmd_compile.h + if [ ! -r $@ -o -O $@ ]; then \ + sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \ -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \ -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \ -e 's/@@domain@@/$(XEN_DOMAIN)/g' \ @@ -440,10 +434,17 @@ include/xen/compile.h: include/xen/compile.h.in .bann= er -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \ -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ -e 's!@@changeset@@!$(shell tools/scmversion $(XEN_ROOT) || echo "una= vailable")!g' \ - < include/xen/compile.h.in > $@.new + < $< > $(dot-target).tmp; \ + sed -rf tools/process-banner.sed < .banner >> $(dot-target).tmp; \ + mv -f $(dot-target).tmp $@; \ + fi +endef + +include/xen/compile.h: include/xen/compile.h.in .banner FORCE @cat .banner - @sed -rf tools/process-banner.sed < .banner >> $@.new - @mv -f $@.new $@ + $(call if_changed,compile.h) + +targets +=3D include/xen/compile.h =20 asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.c $(CC) $(call cpp_flags,$(c_flags)) -S -g0 -o $@.new -MQ $@ $< --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637847653; cv=none; d=zohomail.com; s=zohoarc; b=c0pPAgdd4HnHFNbIVBcNAxNVck5bwBJmlW6PinMBoEifKQh7vwxteT98f97+CaCkIhCXXYaF22jXSVUKapnDYMcP4GUl8USm3fW7fAmlS7ryTCsHpM0EqntHPpsJZRy42idk5ultAo5ejQeUAjQsxiYVsWa+55MG747D4SQRxck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847653; 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=FQOoaCJrSx8Y/9RVOTy8dCFjN2pBzj5nR/goDQ7/pRU=; b=DDdN6fuy2f28fZU9WLl7MVxrGnRxKQqvdZMvlLB7y+0TxdR911RBDYBdujaBboWcPB8Czlb+Ki8qLQ/8S4LRqjAZngWUqNfO/p1wG3zzwzwmTuo4UBsLyD8rw+w5ATIZgvzT0TBrqIwdkm9wA2W2kHQKDfesHqd8Z0CWV0MQ8xY= 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 163784765357191.08021077413662; Thu, 25 Nov 2021 05:40:53 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231208.399946 (Exim 4.92) (envelope-from ) id 1mqEzM-0007js-Mt; Thu, 25 Nov 2021 13:40:36 +0000 Received: by outflank-mailman (output) from mailman id 231208.399946; Thu, 25 Nov 2021 13:40:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqEzM-0007jd-Ib; Thu, 25 Nov 2021 13:40:36 +0000 Received: by outflank-mailman (input) for mailman id 231208; Thu, 25 Nov 2021 13:40:35 +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 1mqEzK-00076i-UV for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:35 +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 429f4ad1-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:40:33 +0100 (CET) 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: 429f4ad1-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847633; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nGDIsDb6T+EAmgMztobre/7LJOc8NJGsQjeWYOHBbk8=; b=Ouf/tb3utT5zvnmGHTKDvynTxwMPy9UIRjCd+tQep1CGX6ZDhsU3JIJy S2LFoAdKOu8/Lc4FBYa2FcWF41rQUQgMSUJTP1KRy3uJrohjLNYH9y9+6 d9qbwzKgnXoaJUbNv0AYIYUPNabqpT0bIpDAQXhYiR8iRAOVulcrUeI2q o=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: ZNcqcpY5cip9ez4m28cyPyD+v1uU72dX8Nlm6tj6/WzseUDxnnAMIZ3dts2PukDTqIrqQevZVJ pLkXY7hE8HKW+76lKEj3v9jfBoyU8HKrHBCn3fDs1JHPDYB17zir6WLBD3CjQ62fVqIAIROrxV Te/4PVjO7VmGULtz5tdyRxvh/idbtDndSWKe2XlGMTMgiw+GNsjThz/S8WiGQrNu/9xtf4fUPp F/xiK4jxrXMQzjmmlXrRtVQMSom2clfTOq0H6xlhjv9xcVMKodwPlSMRzhHlM9OG6RJwxlqqKq tPPEoEsy7q9nPHNfH7f1b0QC X-SBRS: 5.1 X-MesageID: 58617609 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:5S89BK3bP76VCwjv9PbD5ep2kn2cJEfYwER7XKvMYLTBsI5bpzAOm mdJWWjTPv+KYWaheI91PI6wp00Hv5CBzddgHlZupC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkS5PE3oHJ9RGQ74nRLlbHILOCan8ZqTNMEn970Es6wbNh2OaEvPDia++zk YKqyyHgEAfNNw5cagr4PIra9XuDFNyr0N8plgRWicJj5TcypFFMZH4rHomjLmOQf2VhNrXSq 9Avbl2O1jixEx8FUrtJm1tgG6EAaua60QOm0hK6V0U+6/TrS+NbPqsTbZIhhUlrZzqhk8JN6 9pL8pmKdCB1H7PCntsafkRWKnQrVUFG0OevzXmXtMWSywvNcmf2wuUoB0YzVWEa0r8pWycUr 6VecW1TKEDY7w616OvTpu1Ej8I/LM7tLcUHt2tp1z3xBvc6W5HTBa7N4Le02R9t1p4XQqiGN qL1bxJUQkj/RAZuGmwPS84kg+Wx3V3bUyNx/Qf9Sa0fvDGIkV0ZPKLWGMXRUsyHQ4NShEnwj mDM8nn9AxoaHMeC0jfD+XWp7sffkCW+VI8MGbmQ8v9xnEbV1mEVEAcRV1awvb++kEHWZj5EA xVKoGx09/F0rRH1CImmN/GlnJKalhIOZ/lfFao/0jyqlovK7QCmAUVZQAcUPbTKq/QKbTAt0 1aImfbgCjpurKCZRBqhy1uEkd+hEXNLdDFfPEfoWSNAuoC++99r0nojW/46SPbt5uAZDw0c1 NxjQMIWo7wIxfAG2Kyglbwsq2L9/8OZJuLZC+i+Y45E0u+bTNL6D2BLwQKChRqlEGp+ZgPc1 EXoY+DEsIgz4WilzURhutklErCz/OqiOzbBm1NpFJRJ323zoCH8ItEAsGAkehYB3iM4ldjBO hG7hO+szMULYCvCgVFfP+pd9PjGPYC/TI+4B5g4n/JFY4RrdR/vwc2dTRX44owZq2B1yftXE c7CKa6EVC9GYYw6nGveb7pMitcDm3FhrV4/sLimlnxLJ5LFPyXLIVrEWXPTBt0EAFSs/F+Ir o0BbpTSkH2ykoTWO0HqzGLaFnhSRVBTOHw8g5U/mjerLlU0FWc/JeXWxL99KYVpk74MzrXD/ 22nW18ew1363CWVJQKPY3FlSbXuQZcg8i5rYX1yZQ6liyo5fIKizKYDbJ9rL7Mpw/NukKxvR P4fdsTeXvkWEmbb+y4QZIXWpZB5cEj5nhqHOieoOWBtf5NpSwHT1MXjew/jqHsHAiat7JNsq Ly8zALLB5EEQl06XsrRbfuuyXK3vGQcx70uDxeZfIELdRy1ooZwKiH3gvsmGO02KE3OlmmAy gKbIRYEvu2R8YU7x8bE2PKfpICzHuogQkcDRzvH7ay7PDXx93a4xdMSS/6BeD3QWT+m+KimY ukJnfjwPOdewQRPuot4Vb1q0bg/953koLoDllZoG3DCblKKDLJ8IybZgZkT5/MVnrIJ6xGrX k+v+8VBPeTbMczoJ1cdOQ45Y7nRzvoTgDTTsaw4LUiSCPWbJ1ZbvZG+5yWxtRE= IronPort-HdrOrdr: A9a23:TeNFVq7BsRK6x6TIDAPXwM7XdLJyesId70hD6qhwISY7TiX+rb HIoB17726MtN9/YhAdcLy7VZVoBEmsl6KdgrNhWYtKPjOHhILAFugLhuHfKn/bakjDH4ZmpM FdmsNFZuEYY2IXsS+D2njaL+od X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58617609" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v8 04/47] build: set XEN_BUILD_EFI earlier Date: Thu, 25 Nov 2021 13:39:23 +0000 Message-ID: <20211125134006.1076646-5-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847654297100001 Content-Type: text/plain; charset="utf-8" We are going to need the variable XEN_BUILD_EFI earlier. But a side effect of calculating the value of $(XEN_BUILD_EFI) is to also to generate "efi/check.o" which is used for further checks. Thus the whole chain that check for EFI support is moved to "arch.mk". Some other changes are made to avoid too much duplication: - $(efi-check-o): Used to avoid repeating "efi/check.*". We don't set it to the path to the source as it would be wrong as soon as we support out-of-tree build. - $(LD_PE_check_cmd): As it is called twice, with an updated $(EFI_LDFLAGS). $(nr-fixups) is renamed to $(efi-nr-fixups) as the former might be a bit too generic. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v8: - rename to efi-nr-fixups rather than efi-check-relocs - use :=3D when assigning variable in makefile when recursive expansion isn't needed. - no more check of $(efi-y) value for "CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI". =20 v7: - Do the whole check for EFI support in arch.mk. So efi/check.o is produce there and used there, and produce efi/check.efi and use it th= ere. Thus avoid the need to repeat the test done for XEN_BUILD_EFI. xen/arch/x86/Makefile | 38 ++------------------------------------ xen/arch/x86/arch.mk | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 36 deletions(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 8db4cb98edbb..d7d2adc1881e 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -121,44 +121,8 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 { echo "No Multiboot2 header found" >&2; false; } mv $(TMP) $(TARGET) =20 -ifneq ($(efi-y),) - -# Check if the compiler supports the MS ABI. -export XEN_BUILD_EFI :=3D $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o ef= i/check.o 2>/dev/null && echo y) CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI =20 -# Check if the linker supports PE. -EFI_LDFLAGS =3D $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=3D10 -XEN_BUILD_PE :=3D $(if $(XEN_BUILD_EFI),$(call ld-option,$(EFI_LDFLAGS) --= image-base=3D0x100000000 -o efi/check.efi efi/check.o)) -# If the above failed, it may be merely because of the linker not dealing = well -# with debug info. Try again with stripping it. -ifeq ($(CONFIG_DEBUG_INFO)-$(XEN_BUILD_PE),y-n) -EFI_LDFLAGS +=3D --strip-debug -XEN_BUILD_PE :=3D $(call ld-option,$(EFI_LDFLAGS) --image-base=3D0x1000000= 00 -o efi/check.efi efi/check.o) -endif - -ifeq ($(XEN_BUILD_PE),y) - -# Check if the linker produces fixups in PE by default -nr-fixups :=3D $(shell $(OBJDUMP) -p efi/check.efi | grep '^[[:blank:]]*re= loc[[:blank:]]*[0-9][[:blank:]].*DIR64$$' | wc -l) -ifeq ($(nr-fixups),2) -MKRELOC :=3D : -relocs-dummy :=3D -else -MKRELOC :=3D efi/mkreloc -relocs-dummy :=3D efi/relocs-dummy.o -# If the linker produced fixups but not precisely two of them, we need to -# disable it doing so. But if it didn't produce any fixups, it also would= n't -# recognize the option. -ifneq ($(nr-fixups),0) -EFI_LDFLAGS +=3D --disable-reloc-section -endif -endif - -endif # $(XEN_BUILD_PE) - -endif # $(efi-y) - ALL_OBJS :=3D $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/= built_in.o $(ALL_OBJS) =20 ifeq ($(CONFIG_LTO),y) @@ -217,8 +181,10 @@ endif =20 $(TARGET).efi: VIRT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n '= s, A VIRT_START$$,,p') ifeq ($(MKRELOC),:) +relocs-dummy :=3D $(TARGET).efi: ALT_BASE :=3D else +relocs-dummy :=3D efi/relocs-dummy.o $(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's= , A ALT_START$$,,p') endif =20 diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index eea320e618b9..19c9cd206ed0 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -60,5 +60,47 @@ ifeq ($(CONFIG_UBSAN),y) $(call cc-option-add,CFLAGS_UBSAN,CC,-fno-sanitize=3Dalignment) endif =20 +ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y) + +efi-check-o :=3D arch/x86/efi/check.o + +# Check if the compiler supports the MS ABI. +XEN_BUILD_EFI :=3D $(call if-success,$(CC) $(CFLAGS) -c $(efi-check-o:.o= =3D.c) -o $(efi-check-o),y) + +# Check if the linker supports PE. +EFI_LDFLAGS :=3D $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=3D10 +LD_PE_check_cmd =3D $(call ld-option,$(EFI_LDFLAGS) --image-base=3D0x10000= 0000 -o $(efi-check-o:.o=3D.efi) $(efi-check-o)) +XEN_BUILD_PE :=3D $(LD_PE_check_cmd) + +# If the above failed, it may be merely because of the linker not dealing = well +# with debug info. Try again with stripping it. +ifeq ($(CONFIG_DEBUG_INFO)-$(XEN_BUILD_PE),y-n) +EFI_LDFLAGS +=3D --strip-debug +XEN_BUILD_PE :=3D $(LD_PE_check_cmd) +endif + +ifeq ($(XEN_BUILD_PE),y) + +# Check if the linker produces fixups in PE by default +efi-nr-fixups :=3D $(shell $(OBJDUMP) -p $(efi-check-o:.o=3D.efi) | grep '= ^[[:blank:]]*reloc[[:blank:]]*[0-9][[:blank:]].*DIR64$$' | wc -l) + +ifeq ($(efi-nr-fixups),2) +MKRELOC :=3D : +else +MKRELOC :=3D efi/mkreloc +# If the linker produced fixups but not precisely two of them, we need to +# disable it doing so. But if it didn't produce any fixups, it also would= n't +# recognize the option. +ifneq ($(efi-nr-fixups),0) +EFI_LDFLAGS +=3D --disable-reloc-section +endif +endif + +endif # $(XEN_BUILD_PE) + +export XEN_BUILD_EFI XEN_BUILD_PE MKRELOC +export EFI_LDFLAGS +endif + # Set up the assembler include path properly for older toolchains. CFLAGS +=3D -Wa,-I$(BASEDIR)/include --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637847654; cv=none; d=zohomail.com; s=zohoarc; b=nbzevUlDWT2gimw4hRVoGcVZ4aqP+uVaKduCJKAL73Lgb2YkwpWY26sUO0lbYCLne5f0gerrYoWD+ntuTg+7GNadFpbhbyNLzLTpH9bXgIMMAjr2YGVo8ukAn2HYJ2DWpAQIZVfK/Wzt+pRiUzHk/N0B3H8rPKDPCbiEu8STPv4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847654; 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=QvwFE2KjUwtsYFuphbmik6qRX/OJ5m8mmcZcwdOMIXw=; b=YqwltVCvXQFU75ya+mTSJmQpxMQyORIrzhSaF2kMri2LuCAyq4fsvV44m9dD85cVJC28JzwBPEPNNYqfQJv35UbLQOT/1IorLcpCuMG5Cz/mCyCOvQ38WUV7aJ9bVmbwSZsThHtwpnjqhXVSXbP+kHaislXFmtKt43SVgguJltI= 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 1637847654968809.1184165187561; Thu, 25 Nov 2021 05:40:54 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231211.399973 (Exim 4.92) (envelope-from ) id 1mqEzP-0008M5-4N; Thu, 25 Nov 2021 13:40:39 +0000 Received: by outflank-mailman (output) from mailman id 231211.399973; Thu, 25 Nov 2021 13:40:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqEzO-0008Kj-Rs; Thu, 25 Nov 2021 13:40:38 +0000 Received: by outflank-mailman (input) for mailman id 231211; Thu, 25 Nov 2021 13:40:36 +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 1mqEzM-0007NX-Jr for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:36 +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 43c6aa46-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:40:35 +0100 (CET) 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: 43c6aa46-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847635; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jQJAUxBLM/0m6SUtricyeZkrF61UL/f8bZNw+7LnUuE=; b=AlOItSa0uLQlF2q5Wom1cF2QvDZteffvWuQb5gQUQ5CWTZf2bQBSQwgW gpRDmVgqnCZ2r7YVw0E+1sJ1E2DiHo8iUpx1j4mHO+FlIvzZpfnL8YBFf Prxa+EnBsbSLWLcW2oxDgJxCZ2/LxATn0+Cjzts+4ySjlHcXGH2azUwII M=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: SpLB2JVZLT1tpqFMwNTKwhY0jtt7aiU/VagXUS33Zq8+3C3opRRGVoCF7VnfYEvwXWhjClWUYL +BvugkFmclJ+TSOcI9O+65lgd5X9SdVAve0f4ZBegdZAv8zBbgtRGoFH8HunFFEGcdg6WlyMHm RvAyH7oxxZEkRKxIykyMXSW/67MEVaY/rRiYdlbuuiN5zA6N424ygPSXN8wa5Q2Lp6Q+W3MFi9 onrIkyqt4nIS2bBnfb6Bd/o3sUADtwP/yV5ieqQPbMFHVYyU2tEhPcas8d/4L37YUoGrhXzpCN LCVmu09b8sFRgU399y9MBhfT X-SBRS: 5.1 X-MesageID: 59005967 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:KSkYVK/8aKM06a6KKYqfDrUDC3mTJUtcMsCJ2f8bNWPcYEJGY0x3y mAfCzyGOPffZWb3LtkjbN6/ph5UsMOHx9VgTgVrrS48E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si9AttENlFEkvU2ybuOU5NXsZ2YhGmeIdA970Ug6wrdj39Yy6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPgg9 elnuaCAdDsYEa2TlrUEWjViOBNhaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguwqKtXrO4UO/Gl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UIKIFZ3dfyK0PwZl2WA7fkxJ0mmtiZ78KDeDBdXNhiIzidcMKF0IMUux uJ44Jwa7Am2ixwLNNeaj38LqzTQfyJYC6h35IsHBILLixYwzgAQaJPRPSb6/ZWTZogeKUItO DKV2PLPirk0KpAuqJbv+awhBdZguKk= IronPort-HdrOrdr: A9a23:ou8a4KjUqFS9D0myolYCb/bCLnBQXtwji2hC6mlwRA09TySZ// rAoB19726StN9xYgBYpTnuAsi9qB/nmKKdpLNhX4tKPzOW3FdATrsD0WKK+VSJcEfDH6xmpM JdmsBFebvN5DNB4/oSjjPVLz9Z+qjlzJyV X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="59005967" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Stefano Stabellini , "Julien Grall" , Volodymyr Babchuk , Bertrand Marquis Subject: [XEN PATCH v8 05/47] build: adjust $(TARGET).efi creation in arch/arm Date: Thu, 25 Nov 2021 13:39:24 +0000 Message-ID: <20211125134006.1076646-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847656459100007 Content-Type: text/plain; charset="utf-8" There is no need to try to guess a relative path to the "xen.efi" file, we can simply use $@. Also, there's no need to use `notdir`, make already do that work via $(@F). Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich Acked-by: Julien Grall --- Notes: v8: - s/fix/adjust/ in patch title - reviewed xen/arch/arm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index a3a497bafe89..d0dee10102b6 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -95,7 +95,7 @@ endif $(TARGET): $(TARGET)-syms $(OBJCOPY) -O binary -S $< $@ ifeq ($(CONFIG_ARM_64),y) - ln -sf $(notdir $@) ../../$(notdir $@).efi + ln -sf $(@F) $@.efi endif =20 ifeq ($(CONFIG_LTO),y) --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637847656; cv=none; d=zohomail.com; s=zohoarc; b=EgoMGmEmeDJ0KmOI2hTQ9DjYX05Vkq+c2oVOrKSDu3M3Wq4/vCIjUsYv3GOwfYlQPJTh700njgnaMBSAb+aZYJjoOP5+97+JWxOR0CH+Zody4GIKIgOF/mUfccfmhyJTo5ZSzxXHiGbic4BzeIXKm0MuG6XegoNJygcq2TWQjV0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847656; 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=9RWdXrwr7p3PCQQTluC4UMVhNM/h/KQ2FgyFxeVhIAE=; b=DM7sZg9w62wOFa8zAJukpETiCAklLD3FEH1xm1JB07Or/XRK6qRWL85WqyLPmwQq4AubGDbrtK7ramzFNzZUta5Rxtu9jvqHwdwT8P0QA/0qQH4yzvNXUJQBeYNGgt9u1oT1dRAd8hsI84I3v7i2PbsLu2rWjxxwNTaJtiiXSaE= 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 1637847656408288.1783611074135; Thu, 25 Nov 2021 05:40:56 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231212.399988 (Exim 4.92) (envelope-from ) id 1mqEzQ-0000KR-Fv; Thu, 25 Nov 2021 13:40:40 +0000 Received: by outflank-mailman (output) from mailman id 231212.399988; Thu, 25 Nov 2021 13:40:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqEzQ-0000JX-6a; Thu, 25 Nov 2021 13:40:40 +0000 Received: by outflank-mailman (input) for mailman id 231212; Thu, 25 Nov 2021 13:40:39 +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 1mqEzP-0007NX-3f for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:39 +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 44b502de-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:40:37 +0100 (CET) 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: 44b502de-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847637; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YHsU+dt4Hb55OzhCQGfUY0z4Y/tG3kZz9a0zDxOb69o=; b=Qp4FAdw98nb2Kr7xqHjWV9QPaq/b4bqIqs9ia6+vcrfpd28EsGyvOJdZ aaRoJg95c428qH316Y0a7P2v71cCWeEPMJpUnyJ4lHufvlFKx9JYC+gpl 1tuPWX1Y2lYnE8yvpDQcsVkBp7fMgAFYzATI4gChjiJ8MvXriTAnvyXxX A=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: gj+pJuCaRo8jI7mHWRs5YyP3qwjNFqkKRqnSW/DRTxSpPROxIZ0Kdqy6Okr7rcYRXpX1JRm/bk ck5KxqdgRd5HHkK5eOHJu/lbg7GM/q5jqoiLy0+ijqdl6ziXGxzWAyW9nhKLWzySHOqXU6zM9w Purks5NF+u7U7f1VkaNGpKu4IehMwCVs04QglRv5mByZrEt8UAwswREb/HMXWjHl2YVFXpOCre zQ4rgh76FQvlIJSw701h9FCDHvWNjMnO2MPSV475eqsLsE9VdNdkWAXO9IDspke8c5bCwgU6dS IYHSHjuP3zLEIrbKT4f218Pl X-SBRS: 5.1 X-MesageID: 58135402 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:6sphTKzJyYPNrpJAuCV6t+fKwSrEfRIJ4+MujC+fZmUNrF6WrkUHn TdLD26DOv6CZmbzct52a9uyoUkGuMLUndBqTAdkrCAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAuLeNYYH1500s6wrRk2tQAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt+F+8 vNrmoLochskOI3xoMMASzV/KC4raMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uX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6L3Ca9sBTrakRlKRBsA67V 0/TqNlXPbKFZJHsHFILfVd3a+2C0bcfmyXI7ORzK0L/vXcl8L2CWERUHh+NlC0Cc+clbNJ7m b8s6JwM9giyqhs2KdLX3Clb+lOFImEET6h65IoRB5Xmi1Zzx1xPCXAG5vQaPH1bhw1wD3QX IronPort-HdrOrdr: A9a23:fxc+VqjR1iBeIxQuG3ZEuOu8BXBQXtwji2hC6mlwRA09TySZ// rAoB19726StN9xYgBYpTnuAsi9qB/nmKKdpLNhX4tKPzOW3FdATrsD0WKK+VSJcEfDH6xmpM JdmsBFebvN5DNB4/oSjjPVLz9Z+qjlzJyV X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58135402" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 06/47] build: avoid re-executing the main Makefile by introducing build.mk Date: Thu, 25 Nov 2021 13:39:25 +0000 Message-ID: <20211125134006.1076646-7-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847656800100009 Content-Type: text/plain; charset="utf-8" Currently, the xen/Makefile is re-parsed several times: once to start the build process, and several more time with Rules.mk including it. This makes it difficult to work with a Makefile used for several purpose, and it actually slow down the build process. So this patch introduce "build.mk" which Rules.mk will use when present instead of the "Makefile" of a directory. (Linux's Kbuild named that file "Kbuild".) We have a few targets to move to "build.mk" identified by them been build via "make -f Rules.mk" without changing directory. As for the main targets like "build", we can have them depends on there underscore-prefix targets like "_build" without having to use "Rules.mk" while still retaining the check for unsupported architecture. (Those main rules are changed to be single-colon as there should only be a single recipe for them.) With nearly everything needed to move to "build.mk" moved, there is a single dependency left from "Rules.mk": the variable $(TARGET), so its assignement is moved to the main Makefile. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v8: - for $(main-targets) rules, use ; on a single line instead of adding a recipe with only @: - To include build.mk instead of Makefile, use a simpler expresion with $(firstword) and remove the use of $(mk-dir) var - removed an extra blank line, and one when updating $(targets) - reword patch description =20 v7: - new patch xen/Makefile | 69 +++++----------------------------------------------- xen/Rules.mk | 6 ++--- xen/build.mk | 60 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 67 deletions(-) create mode 100644 xen/build.mk diff --git a/xen/Makefile b/xen/Makefile index 2ad7da7ad67b..ed61f38dd335 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -47,6 +47,8 @@ export KCONFIG_CONFIG ?=3D .config =20 export CC CXX LD =20 +export TARGET :=3D $(BASEDIR)/xen + .PHONY: default default: build =20 @@ -293,11 +295,12 @@ export CFLAGS_UBSAN =20 endif # need-config =20 -.PHONY: build install uninstall clean distclean MAP -build install uninstall debug clean distclean MAP:: +main-targets :=3D build install uninstall clean distclean MAP +.PHONY: $(main-targets) ifneq ($(XEN_TARGET_ARCH),x86_32) - $(MAKE) -f Rules.mk _$@ +$(main-targets): %: _% ; else +$(main-targets): echo "*** Xen x86/32 target no longer supported!" endif =20 @@ -406,66 +409,6 @@ $(TARGET): FORCE $(MAKE) -f $(BASEDIR)/Rules.mk arch/$(TARGET_ARCH)/include/asm/asm-offset= s.h $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ =20 -quiet_cmd_banner =3D BANNER $@ -define cmd_banner - if which figlet >/dev/null 2>&1 ; then \ - echo " Xen $(XEN_FULLVERSION)" | figlet -f $< > $@.tmp; \ - else \ - echo " Xen $(XEN_FULLVERSION)" > $@.tmp; \ - fi; \ - mv -f $@.tmp $@ -endef - -.banner: tools/xen.flf FORCE - $(call if_changed,banner) -targets +=3D .banner - -# Don't refresh this files during e.g., 'sudo make install' -quiet_cmd_compile.h =3D UPD $@ -define cmd_compile.h - if [ ! -r $@ -o -O $@ ]; then \ - sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \ - -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \ - -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \ - -e 's/@@domain@@/$(XEN_DOMAIN)/g' \ - -e 's/@@hostname@@/$(XEN_BUILD_HOST)/g' \ - -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!= g' \ - -e 's/@@version@@/$(XEN_VERSION)/g' \ - -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \ - -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ - -e 's!@@changeset@@!$(shell tools/scmversion $(XEN_ROOT) || echo "una= vailable")!g' \ - < $< > $(dot-target).tmp; \ - sed -rf tools/process-banner.sed < .banner >> $(dot-target).tmp; \ - mv -f $(dot-target).tmp $@; \ - fi -endef - -include/xen/compile.h: include/xen/compile.h.in .banner FORCE - @cat .banner - $(call if_changed,compile.h) - -targets +=3D include/xen/compile.h - -asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/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 - @(set -e; \ - echo "/*"; \ - echo " * DO NOT MODIFY."; \ - echo " *"; \ - echo " * This file was auto-generated from $<"; \ - echo " *"; \ - echo " */"; \ - echo ""; \ - echo "#ifndef __ASM_OFFSETS_H__"; \ - echo "#define __ASM_OFFSETS_H__"; \ - echo ""; \ - sed -rne "/^[^#].*=3D=3D>/{s:.*=3D=3D>(.*)<=3D=3D.*:\1:; s: [\$$#]: :; = p;}"; \ - echo ""; \ - echo "#endif") <$< >$@ - SUBDIRS =3D xsm arch/$(TARGET_ARCH) common drivers lib test define all_sources ( find arch/$(TARGET_ARCH)/include -name '*.h' -print; \ diff --git a/xen/Rules.mk b/xen/Rules.mk index d21930a7bf71..7b8b9047cfd5 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -8,9 +8,6 @@ include $(XEN_ROOT)/Config.mk include $(BASEDIR)/scripts/Kbuild.include =20 - -TARGET :=3D $(BASEDIR)/xen - # Note that link order matters! ALL_OBJS-y +=3D $(BASEDIR)/common/built_in.o ALL_OBJS-y +=3D $(BASEDIR)/drivers/built_in.o @@ -36,7 +33,8 @@ SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16,= \ rodata.cst$(a)) \ $(foreach r,rel rel.ro,data.$(r).local) =20 -include Makefile +# The filename build.mk has precedence over Makefile +include $(firstword $(wildcard build.mk) Makefile) =20 # Linking # ------------------------------------------------------------------------= --- diff --git a/xen/build.mk b/xen/build.mk new file mode 100644 index 000000000000..622e841c1cc0 --- /dev/null +++ b/xen/build.mk @@ -0,0 +1,60 @@ +quiet_cmd_banner =3D BANNER $@ +define cmd_banner + if which figlet >/dev/null 2>&1 ; then \ + echo " Xen $(XEN_FULLVERSION)" | figlet -f $< > $@.tmp; \ + else \ + echo " Xen $(XEN_FULLVERSION)" > $@.tmp; \ + fi; \ + mv -f $@.tmp $@ +endef + +.banner: tools/xen.flf FORCE + $(call if_changed,banner) + +targets +=3D .banner + +# Don't refresh this files during e.g., 'sudo make install' +quiet_cmd_compile.h =3D UPD $@ +define cmd_compile.h + if [ ! -r $@ -o -O $@ ]; then \ + sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \ + -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \ + -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \ + -e 's/@@domain@@/$(XEN_DOMAIN)/g' \ + -e 's/@@hostname@@/$(XEN_BUILD_HOST)/g' \ + -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!= g' \ + -e 's/@@version@@/$(XEN_VERSION)/g' \ + -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \ + -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ + -e 's!@@changeset@@!$(shell tools/scmversion $(XEN_ROOT) || echo "una= vailable")!g' \ + < $< > $(dot-target).tmp; \ + sed -rf tools/process-banner.sed < .banner >> $(dot-target).tmp; \ + mv -f $(dot-target).tmp $@; \ + fi +endef + +include/xen/compile.h: include/xen/compile.h.in .banner FORCE + @cat .banner + $(call if_changed,compile.h) + +targets +=3D include/xen/compile.h + +asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/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 + @(set -e; \ + echo "/*"; \ + echo " * DO NOT MODIFY."; \ + echo " *"; \ + echo " * This file was auto-generated from $<"; \ + echo " *"; \ + echo " */"; \ + echo ""; \ + echo "#ifndef __ASM_OFFSETS_H__"; \ + echo "#define __ASM_OFFSETS_H__"; \ + echo ""; \ + sed -rne "/^[^#].*=3D=3D>/{s:.*=3D=3D>(.*)<=3D=3D.*:\1:; s: [\$$#]: :; = p;}"; \ + echo ""; \ + echo "#endif") <$< >$@ --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637847662; cv=none; d=zohomail.com; s=zohoarc; b=HcH0PZsSFHbmMHlPMlFwcKIp8w7c+8afzPIk0sxE9ucQoP8FiuLsVM/6SIcSbaEYTwUmrF05MSRuAbzYpclDaUVwfREF5Zh9bQarFbsxIxoA94wIlw8Kg2aUDKm5GYiT1gYgpD4GQi45nHRaOk92QjMZ+o1wEc78cFbFyhwpGpI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847662; 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=jqxxwcbCkKK8itAF3AcA0bmJT4aFAIqbuKFRWajjXak=; b=dzVXOcDjPEY6jGNfOiCduZOZgQ2QzymsfW8Tmsq0U37Jw6ttpySEPJ3ZAwcq+F5XESSkp5PWpG8etgnQux7qPQQMiVKimAFQdSM9bd5Y23gMbAW1SqfwtQIpTHcbAVDr7twZigq/6EMOPku5igtd4w3rMX5vYcv+nl6rIsRMM5A= 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 1637847662207402.6296034981908; Thu, 25 Nov 2021 05:41:02 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231213.400001 (Exim 4.92) (envelope-from ) id 1mqEzS-0000pE-Sb; Thu, 25 Nov 2021 13:40:42 +0000 Received: by outflank-mailman (output) from mailman id 231213.400001; Thu, 25 Nov 2021 13:40: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 1mqEzS-0000ow-MJ; Thu, 25 Nov 2021 13:40:42 +0000 Received: by outflank-mailman (input) for mailman id 231213; Thu, 25 Nov 2021 13:40: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 1mqEzR-00076i-3Y for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:41 +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 46b671de-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:40:39 +0100 (CET) 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: 46b671de-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847639; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BsQ0L1SVdAVADFxntaJZHkwKYzMkaTauH9gbpRVCxbw=; b=HnAiI2dB7SN8fdeJwM8EUydRkq+dq31WtsI/yWysD6/nTidwwgF2p4Uh sc3n8EVr5PvniXopzbPdH+ZCtHyr8mg7SjfrUBl6H6K9ya5y1/nw56kvw AXf04YHzxkb2TuvaBhPTeMdQsMnv4/IQq8wavnhYmV0ksMgOMUuDVwmVL Q=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: CFpEuAkcoXFQf8bCm347qs/0XBQXY6ak0cV70fuKRK6vSNiKIf5bYoDIhqcQt72CfbctZI2wjj +K/15I7ynq9nzEJ1PHEiEK0r20EN40VAXiy97xO0s3Hs3NleMnwm2DqmO38RaqQvzpWeBvJoyD 4/5u09DQGoaEo5Y685CGw6t50niZjxkWkjVNs/RyVqemQwfs8EuY/pBhacDIkmMQfkp88SpSW9 BIHgRzXfJUq2Ru/pflccgMihAN5Nk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ony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , "Bertrand Marquis" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v8 07/47] build: set ALL_OBJS to main Makefile; move prelink.o to main Makefile Date: Thu, 25 Nov 2021 13:39:26 +0000 Message-ID: <20211125134006.1076646-8-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847663015100001 Content-Type: text/plain; charset="utf-8" This is to avoid arch/$arch/Makefile having to recurse into parents directories. This avoid duplication of the logic to build prelink.o between arches. In order to do that, we cut the $(TARGET) target in the main Makefile in two, there is a "prepare" phase/target runned before starting to build "prelink.o" which will prepare "include/" among other things, then all the $(ALL_OBJS) will be generated in order to build "prelink.o" and finally $(TARGET) will be generated by calling into "arch/*/" to make $(TARGET). Now we don't need to prefix $(ALL_OBJS) with $(BASEDIR) as it is now only used from the main Makefile. Other changes is to use "$<" instead of spelling "prelink.o" in the target "$(TARGET)" in both arch/*/Makefile. Beside "prelink.o" been at a different location, no other functional change intended. Signed-off-by: Anthony PERARD --- Notes: v8: - rebased - move Arm specific dependencies between $(ALL_OBJS) objects (head.o) into Arm specific "Rules.mk" instead of the common "build.mk". =20 v7: - change, now things are in build.mk: no more prepare phase needed xen/Makefile | 15 ++++++++++++++- xen/Rules.mk | 13 ------------- xen/arch/arm/Makefile | 31 ++++--------------------------- xen/arch/arm/Rules.mk | 5 +++++ xen/arch/arm/arch.mk | 2 ++ xen/arch/x86/Makefile | 29 ++++++----------------------- xen/arch/x86/arch.mk | 2 ++ xen/build.mk | 18 ++++++++++++++++++ 8 files changed, 51 insertions(+), 64 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index ed61f38dd335..7bb3595d649f 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -285,8 +285,21 @@ CFLAGS +=3D -flto LDFLAGS-$(CONFIG_CC_IS_CLANG) +=3D -plugin LLVMgold.so endif =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-$(CONFIG_CRYPTO) +=3D crypto/built_in.o + +ALL_LIBS-y :=3D lib/lib.a + include $(BASEDIR)/arch/$(TARGET_ARCH)/arch.mk =20 +export ALL_OBJS :=3D $(ALL_OBJS-y) +export ALL_LIBS :=3D $(ALL_LIBS-y) + # define new variables to avoid the ones defined in Config.mk export XEN_CFLAGS :=3D $(CFLAGS) export XEN_AFLAGS :=3D $(AFLAGS) @@ -407,7 +420,7 @@ $(TARGET): FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C include $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) include $(MAKE) -f $(BASEDIR)/Rules.mk arch/$(TARGET_ARCH)/include/asm/asm-offset= s.h - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ + $(MAKE) -f $(BASEDIR)/Rules.mk $@ =20 SUBDIRS =3D xsm arch/$(TARGET_ARCH) common drivers lib test define all_sources diff --git a/xen/Rules.mk b/xen/Rules.mk index 7b8b9047cfd5..77d359bedaf8 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -8,25 +8,12 @@ include $(XEN_ROOT)/Config.mk include $(BASEDIR)/scripts/Kbuild.include =20 -# Note that link order matters! -ALL_OBJS-y +=3D $(BASEDIR)/common/built_in.o -ALL_OBJS-y +=3D $(BASEDIR)/drivers/built_in.o -ALL_OBJS-y +=3D $(BASEDIR)/lib/built_in.o -ALL_OBJS-y +=3D $(BASEDIR)/xsm/built_in.o -ALL_OBJS-y +=3D $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o -ALL_OBJS-$(CONFIG_CRYPTO) +=3D $(BASEDIR)/crypto/built_in.o - -ALL_LIBS-y :=3D $(BASEDIR)/lib/lib.a - # Initialise some variables lib-y :=3D targets :=3D CFLAGS-y :=3D AFLAGS-y :=3D =20 -ALL_OBJS :=3D $(ALL_OBJS-y) -ALL_LIBS :=3D $(ALL_LIBS-y) - SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16, \ $(foreach w,1 2 4, \ rodata.str$(w).$(a= )) \ diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index d0dee10102b6..14952275772b 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -75,14 +75,6 @@ ifneq ($(CONFIG_DTB_FILE),"") obj-y +=3D dtb.o endif =20 -ALL_OBJS :=3D $(TARGET_SUBARCH)/head.o $(ALL_OBJS) - -# head.o is built by descending into the sub-directory, depends on the par= t of -# $(ALL_OBJS) that will eventually recurse into $(TARGET_SUBARCH)/ and bui= ld -# head.o -$(TARGET_SUBARCH)/head.o: $(BASEDIR)/arch/arm/built_in.o -$(TARGET_SUBARCH)/head.o: ; - ifdef CONFIG_LIVEPATCH all_symbols =3D --all-symbols ifdef CONFIG_FAST_SYMBOL_LOOKUP @@ -98,33 +90,18 @@ ifeq ($(CONFIG_ARM_64),y) ln -sf $(@F) $@.efi endif =20 -ifeq ($(CONFIG_LTO),y) -# Gather all LTO objects together -prelink_lto.o: $(ALL_OBJS) $(ALL_LIBS) - $(LD_LTO) -r -o $@ $(filter-out %.a,$^) --start-group $(filter %.a,$^) --= end-group - -# Link it with all the binary objects -prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o - $(call if_changed,ld) -else -prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE - $(call if_changed,ld) -endif - -targets +=3D prelink.o - -$(TARGET)-syms: prelink.o xen.lds - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o \ +$(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk index e69de29bb2d1..290609487605 100644 --- a/xen/arch/arm/Rules.mk +++ b/xen/arch/arm/Rules.mk @@ -0,0 +1,5 @@ +# head.o is built by descending into arch/arm/$(TARGET_SUBARCH), depends o= n the +# part of $(ALL_OBJS) that will eventually recurse into $(TARGET_SUBARCH)/= and +# build head.o +arch/arm/$(TARGET_SUBARCH)/head.o: arch/arm/built_in.o +arch/arm/$(TARGET_SUBARCH)/head.o: ; diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index c3ac443b3788..ba3f140e2ea7 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -26,3 +26,5 @@ ifeq ($(CONFIG_ARM64_ERRATUM_843419),y) LDFLAGS +=3D --fix-cortex-a53-843419 endif endif + +ALL_OBJS-y :=3D arch/arm/$(TARGET_SUBARCH)/head.o $(ALL_OBJS-y) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index d7d2adc1881e..b469ec8f2452 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -123,37 +123,20 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 =20 CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI =20 -ALL_OBJS :=3D $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/= built_in.o $(ALL_OBJS) - -ifeq ($(CONFIG_LTO),y) -# Gather all LTO objects together -prelink_lto.o: $(ALL_OBJS) $(ALL_LIBS) - $(LD_LTO) -r -o $@ $(filter-out %.a,$^) --start-group $(filter %.a,$^) --= end-group - -# Link it with all the binary objects -prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o FORCE - $(call if_changed,ld) -else -prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE - $(call if_changed,ld) -endif - -targets +=3D prelink.o - -$(TARGET)-syms: prelink.o xen.lds - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ +$(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort \ >$(@D)/.$(@F).0.S $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).0.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-= y) \ >$(@D)/.$(@F).1.S $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ @@ -206,7 +189,7 @@ note_file_option ?=3D $(note_file) =20 ifeq ($(XEN_BUILD_PE),y) extra-y +=3D efi.lds -$(TARGET).efi: prelink.o $(note_file) efi.lds efi/relocs-dummy.o efi/mkrel= oc +$(TARGET).efi: $(BASEDIR)/prelink.o $(note_file) efi.lds efi/relocs-dummy.= o efi/mkreloc ifeq ($(CONFIG_DEBUG_INFO),y) $(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug inf= o from $(@F)" endif @@ -235,7 +218,7 @@ $(TARGET).efi: FORCE echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support) d= isabled' endif =20 -efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o +# These should already have been rebuilt when building the prerequisite of= "prelink.o" efi/buildid.o efi/relocs-dummy.o: ; =20 .PHONY: include diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 19c9cd206ed0..c830dc5b3a7c 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -104,3 +104,5 @@ endif =20 # Set up the assembler include path properly for older toolchains. CFLAGS +=3D -Wa,-I$(BASEDIR)/include + +ALL_OBJS-y :=3D arch/x86/boot/built_in.o arch/x86/efi/built_in.o $(ALL_OBJ= S-y) diff --git a/xen/build.mk b/xen/build.mk index 622e841c1cc0..740945333a97 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -58,3 +58,21 @@ arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: asm-offse= ts.s sed -rne "/^[^#].*=3D=3D>/{s:.*=3D=3D>(.*)<=3D=3D.*:\1:; s: [\$$#]: :; = p;}"; \ echo ""; \ echo "#endif") <$< >$@ + +ifeq ($(CONFIG_LTO),y) +# Gather all LTO objects together +prelink_lto.o: $(ALL_OBJS) $(ALL_LIBS) + $(LD_LTO) -r -o $@ $(filter-out %.a,$^) --start-group $(filter %.a,$^) --= end-group + +# Link it with all the binary objects +prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o FORCE + $(call if_changed,ld) +else +prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE + $(call if_changed,ld) +endif + +targets +=3D prelink.o + +$(TARGET): prelink.o FORCE + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637847662; cv=none; d=zohomail.com; s=zohoarc; b=ile3RKPahALSgo+dDYkJifrdjoL2hMvfrCUsZpN6bG0mdo7bGfL6Ha//uMaCQbSmjvTijG+GvLmKTWX/Pd5Qa+Cf3HPP7gCAKcKQSfYKqrA7HFfK3+ehbjLjIITTlPfFwH75OQCqk3JjWkDMpY0FLaiIt1g4NkLHmPntMAzABo0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847662; 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=0oDL4h2Em9ERU9g8kzR9wKy/6yBo2SHuviNVl/wMmeA=; b=VJzp71PwslI7Fc+BSz4Rl9BCQa5teoHad8i87n0S2VjEH2VhDjLJwDh5ngEA910OyHwrwNJGudzBWYm3SNpTj0PL09CzImDxObJM1QjiG75vHE45jISb2DA8lhBTA6YaGgeBBAaiQNR9/M4NlAsixg4ZpWPxBYk331BP2D3TTEw= 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 1637847662652163.96250310237076; Thu, 25 Nov 2021 05:41:02 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231216.400014 (Exim 4.92) (envelope-from ) id 1mqEzX-0001Ng-JO; Thu, 25 Nov 2021 13:40:47 +0000 Received: by outflank-mailman (output) from mailman id 231216.400014; Thu, 25 Nov 2021 13:40:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqEzX-0001NV-FM; Thu, 25 Nov 2021 13:40:47 +0000 Received: by outflank-mailman (input) for mailman id 231216; Thu, 25 Nov 2021 13:40:46 +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 1mqEzV-0007NX-Pl for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:46 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 489119eb-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:40:43 +0100 (CET) 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: 489119eb-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847643; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+DoWpOrefy3bHbiRl5UkcJKrpDvZ4sPNeqaYR9dgkv4=; b=WSwm5w6TDp7FLQxhr/edNBrRlwO/jFdGWVuQ9DrF8qwl1A3PNKz7dWvM hr/VkKpbeZjUa/jH1ok7bgS/ufeYSZ+oLRN/SoVbtgHZygyM78Z1AwVoi yEmfsGLNwphIAHXxDRzHJlkwiVTrS/rwAtCFNxc17nCwhODBdG9cFJe9j 8=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 5SAE3Vdl+VXpcPW9+Tcu0tse76XkPGg7nmppH5xQjGlyzo8CWDvUh5KhCI1YkpWKvwxXU6NYOm zheUzYseNFauf97cUhDaJrG9Yuoa5g9LJ37icMMdnpxaH6VrFbJo9PY9sK/K+cJLUk1l9XFjY7 OWuXxNGs0fyVlv2cGWsdWZtGF8v3sllIeypFnZgCQB4i5qCz6/UhbcMw/Li+xQfOtEgPrK0iWz PiykNjzE81XebA1g6rXRWTsN4yW2ZaF/Pj3L5Ny03noHhRDT+FzttF3O3ThkZF509nrWsE2yLm 2IoF8/le0beND+pFaUgpLKEx X-SBRS: 5.1 X-MesageID: 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 TJ+jaJpplLh8vLiCM0mlWjt6i/V7Pau5d+Lf3JrvJQBiTniw6uaogkc7qevAotqOXq01oumM mkmWZqAywmgUm9QkiF5T/WnyXw2jcn7HHvjXWCh2H4nMD/TDUmT+JcmINwaHLimhsdleA59J gO83OStpJRAx+Ftj/6/cL0WxZjkVfxiWY+kNQUk2dUXeIlGeFsRLQkjRNo+ao7bX7HAcEcYb RT5fjnlaxrmIahHi/kVmoG+q3lYp18JGbJMxs/Ugr86UkSoJkz9Tpp+CUlpAZ1yHrmI6M0o9 gsep4Y542mbvVmK56VV91xGPde/AT2MF/x2Fz7GyWQKEnxU0i94aIfpo9Fv92CeJsGyoY/kp WEUF4wjx90R6veM7zG4HQQyGG5fIyUZ0Wb9v1j X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634096" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , "Bertrand Marquis" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v8 08/47] build: prepare to always invoke $(MAKE) from xen/, use $(obj) Date: Thu, 25 Nov 2021 13:39:27 +0000 Message-ID: <20211125134006.1076646-9-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847663393100003 Content-Type: text/plain; charset="utf-8" In a future patch, when building a subdirectory, we will set "obj=3D$subdir" rather than change directory. Before that, we add "$(obj)" and "$(src)" in as many places as possible where we will need to know which subdirectory is been built. "$(obj)" is for files been generated during the build, and "$(src)" is for files present in the source tree. For now, we set both to "." in Rules.mk and Makefile.clean. A few places don't tolerate the addition of "./", this is because make remove the leading "./" in targets and dependencies in rules, so these will be change later. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Acked-by: Julien Grall --- Notes: v8: - acked - rebased xen/Rules.mk | 5 ++- xen/arch/arm/Makefile | 14 ++++---- xen/arch/x86/Makefile | 48 ++++++++++++------------- xen/arch/x86/boot/Makefile | 14 ++++---- xen/arch/x86/efi/Makefile | 6 ++-- xen/common/Makefile | 8 ++--- xen/common/libelf/Makefile | 4 +-- xen/common/libfdt/Makefile | 6 ++-- xen/include/Makefile | 44 +++++++++++------------ xen/scripts/Makefile.clean | 5 ++- xen/xsm/flask/Makefile | 36 +++++++++---------- xen/xsm/flask/policy/mkaccess_vector.sh | 7 ++-- 12 files changed, 103 insertions(+), 94 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 77d359bedaf8..60d1d6c4f583 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -3,6 +3,9 @@ # Makefile and are consumed by Rules.mk # =20 +obj :=3D . +src :=3D $(obj) + -include $(BASEDIR)/include/config/auto.conf =20 include $(XEN_ROOT)/Config.mk @@ -21,7 +24,7 @@ SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16,= \ $(foreach r,rel rel.ro,data.$(r).local) =20 # The filename build.mk has precedence over Makefile -include $(firstword $(wildcard build.mk) Makefile) +include $(firstword $(wildcard $(src)/build.mk) $(src)/Makefile) =20 # Linking # ------------------------------------------------------------------------= --- diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 14952275772b..c993ce72a341 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -90,18 +90,18 @@ ifeq ($(CONFIG_ARM_64),y) ln -sf $(@F) $@.efi endif =20 -$(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< \ +$(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ @@ -111,13 +111,13 @@ $(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds .PHONY: include include: =20 -xen.lds: xen.lds.S FORCE +$(obj)/xen.lds: $(src)/xen.lds.S FORCE $(call if_changed,cpp_lds_S) =20 -dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) +$(obj)/dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) =20 .PHONY: clean clean:: - rm -f xen.lds + rm -f $(obj)/xen.lds rm -f $(BASEDIR)/.xen-syms.[0-9]* rm -f $(TARGET).efi diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index b469ec8f2452..f9af39ba6138 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -81,7 +81,7 @@ extra-y +=3D asm-macros.i extra-y +=3D xen.lds =20 ifneq ($(CONFIG_HVM),y) -x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label +$(obj)/x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label endif =20 efi-y :=3D $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \ @@ -112,8 +112,8 @@ syms-warn-dup-$(CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNIN= GS) :=3D syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) :=3D --error-dup =20 $(TARGET): TMP =3D $(@D)/.$(@F).elf32 -$(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 - ./boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TMP) $(XEN_IMG_OFFSET) \ +$(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32 + $(obj)/boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TMP) $(XEN_IMG_OFFSET= ) \ `$(NM) $(TARGET)-syms | sed -ne 's/^\([^ ]*\) . __2M_rwdat= a_end$$/0x\1/p'` od -t x4 -N 8192 $(TMP) | grep 1badb002 > /dev/null || \ { echo "No Multiboot1 header found" >&2; false; } @@ -123,27 +123,27 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 =20 CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI =20 -$(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ +$(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort \ >$(@D)/.$(@F).0.S $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).0.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-= y) \ >$(@D)/.$(@F).1.S $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ >$(@D)/$(@F).map rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]* =20 -note.o: $(TARGET)-syms +$(obj)/note.o: $(TARGET)-syms $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 \ --rename-section=3D.data=3D.note.gnu.build-id -S $@.bin $@ @@ -162,25 +162,25 @@ ifdef SOURCE_DATE_EPOCH EFI_LDFLAGS +=3D --no-insert-timestamp endif =20 -$(TARGET).efi: VIRT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n '= s, A VIRT_START$$,,p') +$(TARGET).efi: VIRT_BASE =3D 0x$(shell $(NM) $(obj)/efi/relocs-dummy.o | s= ed -n 's, A VIRT_START$$,,p') ifeq ($(MKRELOC),:) relocs-dummy :=3D $(TARGET).efi: ALT_BASE :=3D else -relocs-dummy :=3D efi/relocs-dummy.o -$(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's= , A ALT_START$$,,p') +relocs-dummy :=3D $(obj)/efi/relocs-dummy.o +$(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) $(obj)/efi/relocs-dummy.o | se= d -n 's, A ALT_START$$,,p') endif =20 ifneq ($(build_id_linker),) ifeq ($(call ld-ver-build-id,$(LD) $(filter -m%,$(EFI_LDFLAGS))),y) CFLAGS-y +=3D -DBUILD_ID_EFI EFI_LDFLAGS +=3D $(build_id_linker) -note_file :=3D efi/buildid.o +note_file :=3D $(obj)/efi/buildid.o # NB: this must be the last input in the linker call, because inputs follo= wing # the -b option will all be treated as being in the specified format. note_file_option :=3D -b pe-x86-64 $(note_file) else -note_file :=3D note.o +note_file :=3D $(obj)/note.o endif else note_file :=3D @@ -189,25 +189,25 @@ note_file_option ?=3D $(note_file) =20 ifeq ($(XEN_BUILD_PE),y) extra-y +=3D efi.lds -$(TARGET).efi: $(BASEDIR)/prelink.o $(note_file) efi.lds efi/relocs-dummy.= o efi/mkreloc +$(TARGET).efi: $(BASEDIR)/prelink.o $(note_file) $(obj)/efi.lds $(obj)/efi= /relocs-dummy.o $(obj)/efi/mkreloc ifeq ($(CONFIG_DEBUG_INFO),y) $(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug inf= o from $(@F)" endif $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ - $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< $(relocs-dum= my) \ + $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< $(rel= ocs-dummy) \ $(BASEDIR)/common/symbols-dummy.o $(note_file_option) -o = $(@D)/.$(@F).$(base).0 &&) : $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).0= ) >$(@D)/.$(@F).0r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s= .S $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s= .o $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ - $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< \ + $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file_option) -= o $(@D)/.$(@F).$(base).1 &&) : $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).1= ) >$(@D)/.$(@F).1r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s= .S $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s= .o - $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T efi.lds -N $< \ + $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(note_file_option) -= o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort >$(@D)/= $(@F).map @@ -219,14 +219,14 @@ $(TARGET).efi: FORCE endif =20 # These should already have been rebuilt when building the prerequisite of= "prelink.o" -efi/buildid.o efi/relocs-dummy.o: ; +$(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: ; =20 .PHONY: include include: $(BASEDIR)/arch/x86/include/asm/asm-macros.h =20 -asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P +$(obj)/asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P =20 -$(BASEDIR)/arch/x86/include/asm/asm-macros.h: asm-macros.i Makefile +$(BASEDIR)/arch/x86/include/asm/asm-macros.h: $(obj)/asm-macros.i $(src)/M= akefile echo '#if 0' >$@.new echo '.if 0' >>$@.new echo '#endif' >>$@.new @@ -240,14 +240,14 @@ $(BASEDIR)/arch/x86/include/asm/asm-macros.h: asm-mac= ros.i Makefile echo '#endif' >>$@.new $(call move-if-changed,$@.new,$@) =20 -efi.lds: AFLAGS-y +=3D -DEFI -xen.lds efi.lds: xen.lds.S FORCE +$(obj)/efi.lds: AFLAGS-y +=3D -DEFI +$(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE $(call if_changed,cpp_lds_S) =20 -boot/mkelf32: boot/mkelf32.c +$(obj)/boot/mkelf32: $(src)/boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< =20 -efi/mkreloc: efi/mkreloc.c +$(obj)/efi/mkreloc: $(src)/efi/mkreloc.c $(HOSTCC) $(HOSTCFLAGS) -g -o $@ $< =20 .PHONY: clean diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index d2eb277d428f..0aec8a464364 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -1,8 +1,8 @@ obj-bin-y +=3D head.o =20 -DEFS_H_DEPS =3D defs.h $(BASEDIR)/include/xen/stdbool.h +DEFS_H_DEPS =3D $(src)/defs.h $(BASEDIR)/include/xen/stdbool.h =20 -CMDLINE_DEPS =3D $(DEFS_H_DEPS) video.h \ +CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(src)/video.h \ $(BASEDIR)/include/xen/kconfig.h \ $(BASEDIR)/include/generated/autoconf.h =20 @@ -14,10 +14,10 @@ RELOC_DEPS =3D $(DEFS_H_DEPS) \ $(BASEDIR)/include/xen/const.h \ $(BASEDIR)/include/public/arch-x86/hvm/start_info.h =20 -head.o: cmdline.S reloc.S +$(obj)/head.o: $(obj)/cmdline.S $(obj)/reloc.S =20 -cmdline.S: cmdline.c $(CMDLINE_DEPS) build32.lds - $(MAKE) -f build32.mk $@ CMDLINE_DEPS=3D"$(CMDLINE_DEPS)" +$(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) $(src)/build32.lds + $(MAKE) -f build32.mk -C $(obj) $(@F) CMDLINE_DEPS=3D"$(CMDLINE_DEPS)" =20 -reloc.S: reloc.c $(RELOC_DEPS) build32.lds - $(MAKE) -f build32.mk $@ RELOC_DEPS=3D"$(RELOC_DEPS)" +$(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) $(src)/build32.lds + $(MAKE) -f build32.mk -C $(obj) $(@F) RELOC_DEPS=3D"$(RELOC_DEPS)" diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile index 87b927ed865b..ac815f02cb5e 100644 --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -3,16 +3,16 @@ CFLAGS-y +=3D -fshort-wchar quiet_cmd_objcopy_o_ihex =3D OBJCOPY $@ cmd_objcopy_o_ihex =3D $(OBJCOPY) -I ihex -O binary $< $@ =20 -%.o: %.ihex FORCE +$(obj)/%.o: $(src)/%.ihex FORCE $(call if_changed,objcopy_o_ihex) =20 -boot.init.o: buildid.o +$(obj)/boot.init.o: $(obj)/buildid.o =20 EFIOBJ-y :=3D boot.init.o pe.init.o ebmalloc.o runtime.o EFIOBJ-$(CONFIG_COMPAT) +=3D compat.o =20 $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary= =3D4) -$(EFIOBJ-y): CFLAGS-stack-boundary :=3D $(cflags-stack-boundary) +$(addprefix $(obj)/,$(EFIOBJ-y)): CFLAGS-stack-boundary :=3D $(cflags-stac= k-boundary) =20 obj-y :=3D stub.o obj-$(XEN_BUILD_EFI) :=3D $(filter-out %.init.o,$(EFIOBJ-y)) diff --git a/xen/common/Makefile b/xen/common/Makefile index 141d7d40d3dc..ca839118e4d1 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -75,13 +75,13 @@ obj-$(CONFIG_NEEDS_LIBELF) +=3D libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) +=3D libfdt/ =20 CONF_FILE :=3D $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(BASEDIR)/)$(KCONFI= G_CONFIG) -config.gz: $(CONF_FILE) +$(obj)/config.gz: $(CONF_FILE) gzip -n -c $< >$@ =20 -config_data.o: config.gz +$(obj)/config_data.o: $(obj)/config.gz =20 -config_data.S: $(BASEDIR)/tools/binfile FORCE - $(call if_changed,binfile,config.gz xen_config_data) +$(obj)/config_data.S: $(BASEDIR)/tools/binfile FORCE + $(call if_changed,binfile,$(obj)/config.gz xen_config_data) targets +=3D config_data.S =20 clean:: diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile index a92326c982e9..8a4522e4e141 100644 --- a/xen/common/libelf/Makefile +++ b/xen/common/libelf/Makefile @@ -7,10 +7,10 @@ OBJCOPYFLAGS :=3D $(foreach s,$(SECTIONS),--rename-sectio= n .$(s)=3D.init.$(s)) =20 CFLAGS-y +=3D -Wno-pointer-sign =20 -libelf.o: libelf-temp.o FORCE +$(obj)/libelf.o: $(obj)/libelf-temp.o FORCE $(call if_changed,objcopy) =20 -libelf-temp.o: $(libelf-objs) FORCE +$(obj)/libelf-temp.o: $(addprefix $(obj)/,$(libelf-objs)) FORCE $(call if_changed,ld) =20 extra-y +=3D libelf-temp.o $(libelf-objs) diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile index 6bd207cf8ffa..6708af12e583 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -1,4 +1,4 @@ -include Makefile.libfdt +include $(src)/Makefile.libfdt =20 SECTIONS :=3D text data $(SPECIAL_DATA_SECTIONS) OBJCOPYFLAGS :=3D $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$= (s)) @@ -8,10 +8,10 @@ nocov-y +=3D libfdt.o =20 CFLAGS-y +=3D -I$(BASEDIR)/include/xen/libfdt/ =20 -libfdt.o: libfdt-temp.o FORCE +$(obj)/libfdt.o: $(obj)/libfdt-temp.o FORCE $(call if_changed,objcopy) =20 -libfdt-temp.o: $(LIBFDT_OBJS) FORCE +$(obj)/libfdt-temp.o: $(addprefix $(obj)/,$(LIBFDT_OBJS)) FORCE $(call if_changed,ld) =20 extra-y +=3D libfdt-temp.o $(LIBFDT_OBJS) diff --git a/xen/include/Makefile b/xen/include/Makefile index 95daa8a28975..d2f5a956a11a 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -39,57 +39,57 @@ cppflags-$(CONFIG_X86) +=3D -m32 =20 endif =20 -public-$(CONFIG_X86) :=3D $(wildcard public/arch-x86/*.h public/arch-x86/*= /*.h) -public-$(CONFIG_ARM) :=3D $(wildcard public/arch-arm/*.h public/arch-arm/*= /*.h) +public-$(CONFIG_X86) :=3D $(wildcard $(src)/public/arch-x86/*.h $(src)/pub= lic/arch-x86/*/*.h) +public-$(CONFIG_ARM) :=3D $(wildcard $(src)/public/arch-arm/*.h $(src)/pub= lic/arch-arm/*/*.h) =20 .PHONY: all -all: $(headers-y) +all: $(addprefix $(obj)/,$(headers-y)) =20 -compat/%.h: compat/%.i Makefile $(BASEDIR)/tools/compat-build-header.py - $(PYTHON) $(BASEDIR)/tools/compat-build-header.py <$< $@ >>$@.new; \ +$(obj)/compat/%.h: $(obj)/compat/%.i $(src)/Makefile $(BASEDIR)/tools/comp= at-build-header.py + $(PYTHON) $(BASEDIR)/tools/compat-build-header.py <$< $(patsubst $(obj)/%= ,%,$@) >>$@.new; \ mv -f $@.new $@ =20 -compat/%.i: compat/%.c Makefile +$(obj)/compat/%.i: $(obj)/compat/%.c $(src)/Makefile $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CF= LAGS)) $(cppflags-y) -o $@ $< =20 -compat/%.c: public/%.h xlat.lst Makefile $(BASEDIR)/tools/compat-build-sou= rce.py +$(obj)/compat/%.c: $(src)/public/%.h $(src)/xlat.lst $(src)/Makefile $(BAS= EDIR)/tools/compat-build-source.py mkdir -p $(@D) - $(PYTHON) $(BASEDIR)/tools/compat-build-source.py xlat.lst <$< >$@.new + $(PYTHON) $(BASEDIR)/tools/compat-build-source.py $(src)/xlat.lst <$< >$@= .new mv -f $@.new $@ =20 -compat/.xlat/%.h: compat/%.h compat/.xlat/%.lst $(BASEDIR)/tools/get-field= s.sh Makefile +$(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst $(BAS= EDIR)/tools/get-fields.sh $(src)/Makefile export PYTHON=3D$(PYTHON); \ while read what name; do \ $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $< || exi= t $$?; \ done <$(patsubst compat/%,compat/.xlat/%,$(basename $<)).lst >$@.new mv -f $@.new $@ =20 -.PRECIOUS: compat/.xlat/%.lst -compat/.xlat/%.lst: xlat.lst Makefile +.PRECIOUS: $(obj)/compat/.xlat/%.lst +$(obj)/compat/.xlat/%.lst: $(src)/xlat.lst $(src)/Makefile mkdir -p $(@D) grep -v '^[[:blank:]]*#' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -re '= s,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' >$@.new $(call move-if-changed,$@.new,$@) =20 -xlat-y :=3D $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:b= lank:]]+[^[:blank:]]+[[:blank:]]+,,p' xlat.lst | uniq) +xlat-y :=3D $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:b= lank:]]+[^[:blank:]]+[[:blank:]]+,,p' $(src)/xlat.lst | uniq) xlat-y :=3D $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y)) =20 -compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) config/auto.conf Makef= ile +$(obj)/compat/xlat.h: $(addprefix $(obj)/compat/.xlat/,$(xlat-y)) $(obj)/c= onfig/auto.conf $(src)/Makefile cat $(filter %.h,$^) >$@.new mv -f $@.new $@ =20 ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH)) =20 -all: headers.chk headers99.chk headers++.chk +all: $(obj)/headers.chk $(obj)/headers99.chk $(obj)/headers++.chk =20 -PUBLIC_HEADERS :=3D $(filter-out public/arch-% public/dom0_ops.h, $(wildca= rd public/*.h public/*/*.h) $(public-y)) +PUBLIC_HEADERS :=3D $(filter-out $(src)/public/arch-% $(src)/public/dom0_o= ps.h, $(wildcard $(src)/public/*.h $(src)/public/*/*.h) $(public-y)) =20 -PUBLIC_C99_HEADERS :=3D public/io/9pfs.h public/io/pvcalls.h -PUBLIC_ANSI_HEADERS :=3D $(filter-out public/%ctl.h public/xsm/% public/%h= vm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) +PUBLIC_C99_HEADERS :=3D $(src)/public/io/9pfs.h $(src)/public/io/pvcalls.h +PUBLIC_ANSI_HEADERS :=3D $(filter-out $(src)/public/%ctl.h $(src)/public/x= sm/% $(src)/public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) =20 public/io/9pfs.h-prereq :=3D string public/io/pvcalls.h-prereq :=3D string =20 -headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile +$(obj)/headers.chk: $(PUBLIC_ANSI_HEADERS) $(src)/Makefile for i in $(filter %.h,$^); do \ $(CC) -x c -ansi -Wall -Werror -include stdint.h \ -S -o /dev/null $$i || exit 1; \ @@ -97,7 +97,7 @@ headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile done >$@.new mv $@.new $@ =20 -headers99.chk: $(PUBLIC_C99_HEADERS) Makefile +$(obj)/headers99.chk: $(PUBLIC_C99_HEADERS) $(src)/Makefile rm -f $@.new $(foreach i, $(filter %.h,$^), \ echo "#include "\"$(i)\" \ @@ -107,7 +107,7 @@ headers99.chk: $(PUBLIC_C99_HEADERS) Makefile || exit $$?; echo $(i) >> $@.new;) mv $@.new $@ =20 -headers++.chk: $(PUBLIC_HEADERS) Makefile +$(obj)/headers++.chk: $(PUBLIC_HEADERS) $(src)/Makefile rm -f $@.new if ! $(CXX) -v >/dev/null 2>&1; then \ touch $@.new; \ @@ -116,7 +116,7 @@ headers++.chk: $(PUBLIC_HEADERS) Makefile $(foreach i, $(filter %.h,$^), \ echo "#include "\"$(i)\" \ | $(CXX) -x c++ -std=3Dgnu++98 -Wall -Werror -D__XEN_TOOLS__ \ - -include stdint.h -include public/xen.h \ + -include stdint.h -include $(src)/public/xen.h \ $(foreach j, $($(i)-prereq), -include c$(j)) -S -o /dev/null - \ || exit $$?; echo $(i) >> $@.new;) mv $@.new $@ @@ -126,7 +126,7 @@ endif ifeq ($(XEN_TARGET_ARCH),x86_64) .PHONY: lib-x86-all lib-x86-all: - $(MAKE) -C xen/lib/x86 all + $(MAKE) -C $(obj)/xen/lib/x86 all =20 all: lib-x86-all endif diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index 8582ec35e4da..c3b0681611da 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -3,11 +3,14 @@ # Cleaning up # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 +obj :=3D . +src :=3D $(obj) + clean:: =20 include $(BASEDIR)/scripts/Kbuild.include =20 -include Makefile +include $(src)/Makefile =20 # Figure out what we need to clean from the various variables # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 11c530dcf458..51fd37f6c4d5 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -4,46 +4,46 @@ obj-y +=3D flask_op.o =20 obj-y +=3D ss/ =20 -CFLAGS-y +=3D -I./include +CFLAGS-y +=3D -I$(obj)/include =20 AWK =3D awk =20 -FLASK_H_DEPEND =3D policy/security_classes policy/initial_sids -AV_H_DEPEND =3D policy/access_vectors +FLASK_H_DEPEND :=3D $(addprefix $(src)/policy/,security_classes initial_si= ds) +AV_H_DEPEND =3D $(src)/policy/access_vectors =20 -FLASK_H_FILES =3D include/flask.h include/class_to_string.h include/initia= l_sid_to_string.h -AV_H_FILES =3D include/av_perm_to_string.h include/av_permissions.h -ALL_H_FILES =3D $(FLASK_H_FILES) $(AV_H_FILES) +FLASK_H_FILES :=3D flask.h class_to_string.h initial_sid_to_string.h +AV_H_FILES :=3D av_perm_to_string.h av_permissions.h +ALL_H_FILES :=3D $(addprefix include/,$(FLASK_H_FILES) $(AV_H_FILES)) =20 -$(obj-y) ss/built_in.o: $(ALL_H_FILES) +$(addprefix $(obj)/,$(obj-y)) $(obj)/ss/built_in.o: $(addprefix $(obj)/,$(= ALL_H_FILES)) extra-y +=3D $(ALL_H_FILES) =20 -mkflask :=3D policy/mkflask.sh +mkflask :=3D $(src)/policy/mkflask.sh quiet_cmd_mkflask =3D MKFLASK $@ -cmd_mkflask =3D $(SHELL) $(mkflask) $(AWK) include $(FLASK_H_DEPEND) +cmd_mkflask =3D $(SHELL) $(mkflask) $(AWK) $(obj)/include $(FLASK_H_DEPEND) =20 -$(subst include/,%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE +$(addprefix $(obj)/%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE $(call if_changed,mkflask) =20 -mkaccess :=3D policy/mkaccess_vector.sh +mkaccess :=3D $(src)/policy/mkaccess_vector.sh quiet_cmd_mkaccess =3D MKACCESS VECTOR $@ -cmd_mkaccess =3D $(SHELL) $(mkaccess) $(AWK) $(AV_H_DEPEND) +cmd_mkaccess =3D $(SHELL) $(mkaccess) $(AWK) $(obj)/include $(AV_H_DEPEND) =20 -$(subst include/,%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkaccess) FORCE +$(addprefix $(obj)/%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkaccess) FORCE $(call if_changed,mkaccess) =20 obj-bin-$(CONFIG_XSM_FLASK_POLICY) +=3D flask-policy.o -flask-policy.o: policy.bin +$(obj)/flask-policy.o: $(obj)/policy.bin =20 -flask-policy.S: BINFILE_FLAGS :=3D -i -flask-policy.S: $(BASEDIR)/tools/binfile FORCE - $(call if_changed,binfile,policy.bin xsm_flask_init_policy) +$(obj)/flask-policy.S: BINFILE_FLAGS :=3D -i +$(obj)/flask-policy.S: $(BASEDIR)/tools/binfile FORCE + $(call if_changed,binfile,$(obj)/policy.bin xsm_flask_init_policy) targets +=3D flask-policy.S =20 FLASK_BUILD_DIR :=3D $(CURDIR) POLICY_SRC :=3D $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) =20 -policy.bin: FORCE +$(obj)/policy.bin: FORCE $(MAKE) -f $(XEN_ROOT)/tools/flask/policy/Makefile.common \ -C $(XEN_ROOT)/tools/flask/policy \ FLASK_BUILD_DIR=3D$(FLASK_BUILD_DIR) POLICY_FILENAME=3D$(POLICY_S= RC) diff --git a/xen/xsm/flask/policy/mkaccess_vector.sh b/xen/xsm/flask/policy= /mkaccess_vector.sh index 942ede4713f1..ad9772193bff 100755 --- a/xen/xsm/flask/policy/mkaccess_vector.sh +++ b/xen/xsm/flask/policy/mkaccess_vector.sh @@ -8,9 +8,12 @@ set -e awk=3D$1 shift =20 +output_dir=3D$1 +shift + # output files -av_permissions=3D"include/av_permissions.h" -av_perm_to_string=3D"include/av_perm_to_string.h" +av_permissions=3D"$output_dir/av_permissions.h" +av_perm_to_string=3D"$output_dir/av_perm_to_string.h" =20 cat $* | $awk " BEGIN { --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637847666; cv=none; d=zohomail.com; s=zohoarc; b=FiPt6eAe6ts5ydnL5NMFhsceuocag2b9gz+HZn1WDwty+JRyxbDU2sG2SgVDnytMSOfP8BSwGophIasr7g4eqpekP0xctn2oQ1sd04o/orp5GHOpSzJ7f9w25hAGFjrkgsnV/f2UN7Hxmi+pgGQYyUgoT1QgBTF96RhSbjzRxV4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847666; 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=yKJntEF3LIrX4VIvppg5IiPA9oWIE32vqVEo/EPiuEA=; b=FBZ3wFg/hpkEb+lgkAJmD1yW/LeHR7PKwwIVs/gS09m2xCG76+TCD3lPeT3xgCKvIEUNh1cJelExUYajMGDweOYIFxIbHRWTTcd3Dux5G40l63hEJs5juehW3lnnfRLVnPn2RSfT+5oKb/Cf8y2ESEntxFcmxHcLylQKPzH1Auo= 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 1637847666489923.9382458957723; Thu, 25 Nov 2021 05:41:06 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231217.400026 (Exim 4.92) (envelope-from ) id 1mqEza-0001pR-4q; Thu, 25 Nov 2021 13:40:50 +0000 Received: by outflank-mailman (output) from mailman id 231217.400026; Thu, 25 Nov 2021 13:40:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqEzZ-0001oU-TX; Thu, 25 Nov 2021 13:40:49 +0000 Received: by outflank-mailman (input) for mailman id 231217; Thu, 25 Nov 2021 13:40:48 +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 1mqEzY-00076i-4K for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:48 +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 4a35d60d-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:40:46 +0100 (CET) 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: 4a35d60d-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847646; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0Qk7QJytYsP1D9c/kGPePeSzFTMWtSOdoBjtTAGXneQ=; b=ckLBolWo28cuqFIgMK9D8dLQnlvcTP5HsqnSN0QAqkhaNfUo4V5Sz621 fURgiE8WsdoCzxp+RogxxQ/XeVtAk7PpPyaik8x5zMr5teIMe0ZpSB2R4 WCVgnJtkhLuLuj6xp5cfbegIVOssJjzlfT8jMbLDCq1MWgz7LvtF2sCZy c=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: xHNp3YLKbZ03i7NzjHDCwsRxTS1zoIYGH3M/WEB58jY6Wav6qUK2vg81HijqwWpijSK4vW0Ddp tUchtlzQ6Kez0AlMiLCu6IyANiusc/AUTf5++rycOv8odPEowxix3tF86OJQtSATStJjC2CQzz jRD3boS4bC8gKOgLuL97l4t8r+B1U+21DKYbidLMgFhDimT9BFPZ+Mf1eeBLm1mzJbEspPChaI TOdbtHIFudsahcLeh6hirPZjXfOlpas0rZhK8pISQxLpKR9QZbrGEgVCoZyyeWb+Ey/0462Not xgE5hAsPsGbiwBARO/IkBkQ4 X-SBRS: 5.1 X-MesageID: 58135420 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:jvw3Vq3wW61z6ozrpPbD5UZ2kn2cJEfYwER7XKvMYLTBsI5bpzEHz 2JOUWqHbq2LNmTxeo0na9zn9x8AvJOByd41HlRppC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkS5PE3oHJ9RGQ74nRLlbHILOCan8ZqTNMEn970Es6wbNh2OaEvPDia++zk YKqyyHgEAfNNw5cagr4PIra9XuDFNyr0N8plgRWicJj5TcypFFMZH4rHomjLmOQf2VhNrXSq 9Avbl2O1jixEx8FUrtJm1tgG6EAaua60QOm0hK6V0U+6/TrS+NbPqsTbZIhhUlrZzqhpPdYj /4XjYyLdEQWM5TcwqM9Vz9eDHQrVUFG0OevzXmXtMWSywvNcmf2wuUoB0YzVWEa0r8pWycUr 6VecW1TKEDY7w616OvTpu1Ej8I/LM7tLcUHt2tp1z3xBvc6W5HTBa7N4Le02R9t1pkVQKqEP 6L1bxIsQhD4XDZ3MW4pAbQ8ksaOg2n+WhRh/Qf9Sa0fvDGIkV0ZPKLWGMHOZtWASM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PSb6/ZWTZogeKUItO DKV2PLPirk0KpAuqJbv+awhBdZguKk= IronPort-HdrOrdr: A9a23:0tvfDaslqpijLddR0KDCMu5x7skDTtV00zEX/kB9WHVpmszxra 6TdZMgpHnJYVcqKQkdcL+7WJVoLUmxyXcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyIMbEQt6fHCWeDfOrIuOP3kpyVuQ== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58135420" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , Ross Lagerwall Subject: [XEN PATCH v8 09/47] build: rework test/livepatch/Makefile Date: Thu, 25 Nov 2021 13:39:28 +0000 Message-ID: <20211125134006.1076646-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847668406100001 Content-Type: text/plain; charset="utf-8" This rework the livepatch/Makefile to make it less repetitive and make use of the facilities. All the targets to be built are now listed in $(extra-y) which will allow Rules.mk to build them without the need of a local target in a future patch. There are some changes/fixes in this patch: - when "xen-syms" is used for a target, it is added to the dependency list of the target, which allow to rebuild the target when xen-syms changes. But if "xen-syms" is missing, make simply fails. - modinfo.o wasn't removing it's $@.bin file like the other targets, this is now done. - The command to build *.livepatch targets as been fixed to use $(XEN_LDFLAGS) rather than just $(LDFLAGS) which is a fallout from 2740d96efdd3 ("xen/build: have the root Makefile generates the CFLAGS") make will findout the dependencies of the *.livepatch files and thus what to built by "looking" at the objects listed in the *-objs variables. The actual dependencies is generated by the new "multi-depend" macro. "$(targets)" needs to be updated with the objects listed in the different *-objs variables to allow make to load the .*.cmd dependency files. This patch copies the macro "multi_depend" from Linux 5.12, and rename it to "multi-depend". Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v8: - rename multi_depend to multi-depend - use $() for single-letter make variable - re-indent one line xen/scripts/Kbuild.include | 9 ++ xen/test/livepatch/Makefile | 213 ++++++++++++++---------------------- 2 files changed, 91 insertions(+), 131 deletions(-) diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 83c7e1457baa..21030cfcfbc1 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -151,3 +151,12 @@ why =3D = \ =20 echo-why =3D $(call escsq, $(strip $(why))) endif + +# Useful for describing the dependency of composite objects +# Usage: +# $(call multi-depend, multi-used-targets, suffix-to-remove, suffix-to-a= dd) +define multi-depend +$(foreach m, $(notdir $1), \ + $(eval $(obj)/$(m): \ + $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=3D%$(s))))))) +endef diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index 148dddb90473..69fadccd01ea 100644 --- a/xen/test/livepatch/Makefile +++ b/xen/test/livepatch/Makefile @@ -12,81 +12,29 @@ CODE_ADDR=3D$(shell nm --defined $(1) | grep $(2) | awk= '{print "0x"$$1}') CODE_SZ=3D$(shell nm --defined -S $(1) | grep $(2) | awk '{ print "0x"$$2}= ') =20 .PHONY: default - -LIVEPATCH :=3D xen_hello_world.livepatch -LIVEPATCH_BYE :=3D xen_bye_world.livepatch -LIVEPATCH_REPLACE :=3D xen_replace_world.livepatch -LIVEPATCH_NOP :=3D xen_nop.livepatch -LIVEPATCH_NO_XEN_BUILDID :=3D xen_no_xen_buildid.livepatch -LIVEPATCH_PREPOST_HOOKS :=3D xen_prepost_hooks.livepatch -LIVEPATCH_PREPOST_HOOKS_FAIL :=3D xen_prepost_hooks_fail.livepatch -LIVEPATCH_ACTION_HOOKS :=3D xen_action_hooks.livepatch -LIVEPATCH_ACTION_HOOKS_NOFUNC :=3D xen_action_hooks_nofunc.livepatch -LIVEPATCH_ACTION_HOOKS_MARKER:=3D xen_action_hooks_marker.livepatch -LIVEPATCH_ACTION_HOOKS_NOAPPLY:=3D xen_action_hooks_noapply.livepatch -LIVEPATCH_ACTION_HOOKS_NOREVERT:=3D xen_action_hooks_norevert.livepatch -LIVEPATCH_EXPECTATIONS:=3D xen_expectations.livepatch -LIVEPATCH_EXPECTATIONS_FAIL:=3D xen_expectations_fail.livepatch - -LIVEPATCHES +=3D $(LIVEPATCH) -LIVEPATCHES +=3D $(LIVEPATCH_BYE) -LIVEPATCHES +=3D $(LIVEPATCH_REPLACE) -LIVEPATCHES +=3D $(LIVEPATCH_NOP) -LIVEPATCHES +=3D $(LIVEPATCH_NO_XEN_BUILDID) -LIVEPATCHES +=3D $(LIVEPATCH_PREPOST_HOOKS) -LIVEPATCHES +=3D $(LIVEPATCH_PREPOST_HOOKS_FAIL) -LIVEPATCHES +=3D $(LIVEPATCH_ACTION_HOOKS) -LIVEPATCHES +=3D $(LIVEPATCH_ACTION_HOOKS_NOFUNC) -LIVEPATCHES +=3D $(LIVEPATCH_ACTION_HOOKS_MARKER) -LIVEPATCHES +=3D $(LIVEPATCH_ACTION_HOOKS_NOAPPLY) -LIVEPATCHES +=3D $(LIVEPATCH_ACTION_HOOKS_NOREVERT) -LIVEPATCHES +=3D $(LIVEPATCH_EXPECTATIONS) -LIVEPATCHES +=3D $(LIVEPATCH_EXPECTATIONS_FAIL) - -LIVEPATCH_DEBUG_DIR ?=3D $(DEBUG_DIR)/xen-livepatch - build default: livepatch =20 -install: livepatch - $(INSTALL_DIR) $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) - $(INSTALL_DATA) $(LIVEPATCHES) $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) - -uninstall: - cd $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) && rm -f $(LIVEPATCHES) - -.PHONY: clean -clean:: - rm -f *.o .*.o.d *.livepatch config.h expect_config.h +extra-y +=3D xen_hello_world.livepatch +xen_hello_world-objs :=3D xen_hello_world_func.o xen_hello_world.o note.o = xen_note.o modinfo.o +$(obj)/xen_hello_world.o: $(obj)/config.h =20 # # To compute these values we need the binary files: xen-syms # and xen_hello_world_func.o to be already compiled. # -.PHONY: config.h -config.h: OLD_CODE_SZ=3D$(call CODE_SZ,$(BASEDIR)/xen-syms,xen_extra_versi= on) -config.h: NEW_CODE_SZ=3D$(call CODE_SZ,$<,xen_hello_world) -config.h: MINOR_VERSION_SZ=3D$(call CODE_SZ,$(BASEDIR)/xen-syms,xen_minor_= version) -config.h: MINOR_VERSION_ADDR=3D$(call CODE_ADDR,$(BASEDIR)/xen-syms,xen_mi= nor_version) -config.h: xen_hello_world_func.o +$(obj)/config.h: $(obj)/xen_hello_world_func.o (set -e; \ - echo "#define NEW_CODE_SZ $(NEW_CODE_SZ)"; \ - echo "#define MINOR_VERSION_SZ $(MINOR_VERSION_SZ)"; \ - echo "#define MINOR_VERSION_ADDR $(MINOR_VERSION_ADDR)"; \ - echo "#define OLD_CODE_SZ $(OLD_CODE_SZ)") > $@ + echo "#define NEW_CODE_SZ $(call CODE_SZ,$<,xen_hello_world)"; \ + echo "#define MINOR_VERSION_SZ $(call CODE_SZ,$(BASEDIR)/xen-syms,xen_mi= nor_version)"; \ + echo "#define MINOR_VERSION_ADDR $(call CODE_ADDR,$(BASEDIR)/xen-syms,xe= n_minor_version)"; \ + echo "#define OLD_CODE_SZ $(call CODE_SZ,$(BASEDIR)/xen-syms,xen_extra_v= ersion)") > $@ =20 -xen_hello_world.o: config.h - -.PHONY: $(LIVEPATCH) -$(LIVEPATCH): xen_hello_world_func.o xen_hello_world.o note.o xen_note.o m= odinfo.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH) $^ - -.PHONY: modinfo.o -modinfo.o: +$(obj)/modinfo.o: (set -e; \ printf "LIVEPATCH_RULEZ\0") > $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=3D.data=3D.modinfo,alloc,load,readonly,data,contents= -S $@.bin $@ - #rm -f $@.bin + rm -f $@.bin =20 # # This target is only accessible if CONFIG_LIVEPATCH is defined, which @@ -97,9 +45,8 @@ modinfo.o: # not be built (it is for EFI builds), and that we do not have # the note.o.bin to muck with (as it gets deleted) # -.PHONY: note.o -note.o: - $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $(BASEDIR)/xen-s= yms $@.bin +$(obj)/note.o: $(BASEDIR)/xen-syms + $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=3D.data=3D.livepatch.depends,alloc,load,readonly,dat= a,contents -S $@.bin $@ rm -f $@.bin @@ -108,9 +55,8 @@ note.o: # Append .livepatch.xen_depends section # with Xen build-id derived from xen-syms. # -.PHONY: xen_note.o -xen_note.o: - $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $(BASEDIR)/xen-s= yms $@.bin +$(obj)/xen_note.o: $(BASEDIR)/xen-syms + $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=3D.data=3D.livepatch.xen_depends,alloc,load,readonly= ,data,contents -S $@.bin $@ rm -f $@.bin @@ -119,102 +65,107 @@ xen_note.o: # Extract the build-id of the xen_hello_world.livepatch # (which xen_bye_world will depend on). # -.PHONY: hello_world_note.o -hello_world_note.o: $(LIVEPATCH) - $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $(LIVEPATCH) $@.= bin +$(obj)/hello_world_note.o: $(obj)/xen_hello_world.livepatch + $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=3D.data=3D.livepatch.depends,alloc,load,readonly,dat= a,contents -S $@.bin $@ rm -f $@.bin =20 -xen_bye_world.o: config.h =20 -.PHONY: $(LIVEPATCH_BYE) -$(LIVEPATCH_BYE): xen_bye_world_func.o xen_bye_world.o hello_world_note.o = xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_BYE) $^ +extra-y +=3D xen_bye_world.livepatch +xen_bye_world-objs :=3D xen_bye_world_func.o xen_bye_world.o hello_world_n= ote.o xen_note.o +$(obj)/xen_bye_world.o: $(obj)/config.h =20 -xen_replace_world.o: config.h =20 -.PHONY: $(LIVEPATCH_REPLACE) -$(LIVEPATCH_REPLACE): xen_replace_world_func.o xen_replace_world.o note.o = xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_REPLACE) $^ +extra-y +=3D xen_replace_world.livepatch +xen_replace_world-objs :=3D xen_replace_world_func.o xen_replace_world.o n= ote.o xen_note.o +$(obj)/xen_replace_world.o: $(obj)/config.h =20 -xen_nop.o: config.h =20 -.PHONY: $(LIVEPATCH_NOP) -$(LIVEPATCH_NOP): xen_nop.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_NOP) $^ +extra-y +=3D xen_nop.livepatch +xen_nop-objs :=3D xen_nop.o note.o xen_note.o +$(obj)/xen_nop.o: $(obj)/config.h =20 # This one always fails upon upload, because it deliberately # does not have a .livepatch.xen_depends (xen_note.o) section. -xen_no_xen_buildid.o: config.h - -.PHONY: $(LIVEPATCH_NO_XEN_BUILDID) -$(LIVEPATCH_NO_XEN_BUILDID): xen_nop.o note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_NO_XEN_BUILDID) $^ +extra-y +=3D xen_no_xen_buildid.livepatch +xen_no_xen_buildid-objs :=3D xen_nop.o note.o =20 -xen_prepost_hooks.o: config.h +$(obj)/xen_prepost_hooks.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_PREPOST_HOOKS) -$(LIVEPATCH_PREPOST_HOOKS): xen_prepost_hooks.o xen_hello_world_func.o not= e.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_PREPOST_HOOKS) $^ +extra-y +=3D xen_prepost_hooks.livepatch +xen_prepost_hooks-objs :=3D xen_prepost_hooks.o xen_hello_world_func.o not= e.o xen_note.o =20 -xen_prepost_hooks_fail.o: config.h +$(obj)/xen_prepost_hooks_fail.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_PREPOST_HOOKS_FAIL) -$(LIVEPATCH_PREPOST_HOOKS_FAIL): xen_prepost_hooks_fail.o xen_hello_world_= func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_PREPOST_HOOKS_FAIL)= $^ +extra-y +=3D xen_prepost_hooks_fail.livepatch +xen_prepost_hooks_fail-objs :=3D xen_prepost_hooks_fail.o xen_hello_world_= func.o note.o xen_note.o =20 -xen_action_hooks.o: config.h +$(obj)/xen_action_hooks.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_ACTION_HOOKS) -$(LIVEPATCH_ACTION_HOOKS): xen_action_hooks.o xen_hello_world_func.o note.= o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS) $^ +extra-y +=3D xen_action_hooks.livepatch +xen_action_hooks-objs :=3D xen_action_hooks.o xen_hello_world_func.o note.= o xen_note.o =20 -xen_action_hooks_nofunc.o: config.h +$(obj)/xen_action_hooks_nofunc.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_ACTION_HOOKS_NOFUNC) -$(LIVEPATCH_ACTION_HOOKS_NOFUNC): xen_action_hooks_nofunc.o note.o xen_not= e.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_NOFUNC= ) $^ +extra-y +=3D xen_action_hooks_nofunc.livepatch +xen_action_hooks_nofunc-objs :=3D xen_action_hooks_nofunc.o note.o xen_not= e.o =20 -xen_action_hooks_marker.o: config.h +$(obj)/xen_action_hooks_marker.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_ACTION_HOOKS_MARKER) -$(LIVEPATCH_ACTION_HOOKS_MARKER): xen_action_hooks_marker.o xen_hello_worl= d_func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_MARKER= ) $^ +extra-y +=3D xen_action_hooks_marker.livepatch +xen_action_hooks_marker-objs :=3D xen_action_hooks_marker.o xen_hello_worl= d_func.o note.o xen_note.o =20 -xen_action_hooks_noapply.o: config.h +$(obj)/xen_action_hooks_noapply.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_ACTION_HOOKS_NOAPPLY) -$(LIVEPATCH_ACTION_HOOKS_NOAPPLY): xen_action_hooks_marker.o xen_hello_wor= ld_func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_NOAPPL= Y) $^ +extra-y +=3D xen_action_hooks_noapply.livepatch +xen_action_hooks_noapply-objs :=3D xen_action_hooks_marker.o xen_hello_wor= ld_func.o note.o xen_note.o =20 -xen_action_hooks_norevert.o: config.h +$(obj)/xen_action_hooks_norevert.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_ACTION_HOOKS_NOREVERT) -$(LIVEPATCH_ACTION_HOOKS_NOREVERT): xen_action_hooks_marker.o xen_hello_wo= rld_func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_NOREVE= RT) $^ +extra-y +=3D xen_action_hooks_norevert.livepatch +xen_action_hooks_norevert-objs :=3D xen_action_hooks_marker.o xen_hello_wo= rld_func.o note.o xen_note.o =20 EXPECT_BYTES_COUNT :=3D 8 CODE_GET_EXPECT=3D$(shell $(OBJDUMP) -d --insn-width=3D1 $(1) | sed -n -e = '/<'$(2)'>:$$/,/^$$/ p' | tail -n +2 | head -n $(EXPECT_BYTES_COUNT) | awk = '{$$0=3D$$2; printf "%s", substr($$0,length-1)}' | sed 's/.\{2\}/0x&,/g' | = sed 's/^/{/;s/,$$/}/g') -.PHONY: expect_config.h -expect_config.h: EXPECT_BYTES=3D$(call CODE_GET_EXPECT,$(BASEDIR)/xen-syms= ,xen_extra_version) -expect_config.h: +$(obj)/expect_config.h: $(BASEDIR)/xen-syms (set -e; \ - echo "#define EXPECT_BYTES $(EXPECT_BYTES)"; \ + echo "#define EXPECT_BYTES $(call CODE_GET_EXPECT,$<,xen_extra_version)"= ; \ echo "#define EXPECT_BYTES_COUNT $(EXPECT_BYTES_COUNT)") > $@ =20 -xen_expectations.o: expect_config.h +$(obj)/xen_expectations.o: $(obj)/expect_config.h =20 -.PHONY: $(LIVEPATCH_EXPECTATIONS) -$(LIVEPATCH_EXPECTATIONS): xen_expectations.o xen_hello_world_func.o note.= o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_EXPECTATIONS) $^ +extra-y +=3D xen_expectations.livepatch +xen_expectations-objs :=3D xen_expectations.o xen_hello_world_func.o note.= o xen_note.o =20 -.PHONY: $(LIVEPATCH_EXPECTATIONS_FAIL) -$(LIVEPATCH_EXPECTATIONS_FAIL): xen_expectations_fail.o xen_hello_world_fu= nc.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_EXPECTATIONS_FAIL) = $^ +extra-y +=3D xen_expectations_fail.livepatch +xen_expectations_fail-objs :=3D xen_expectations_fail.o xen_hello_world_fu= nc.o note.o xen_note.o + + +quiet_cmd_livepatch =3D LD $@ +cmd_livepatch =3D $(LD) $(XEN_LDFLAGS) $(build_id_linker) -r -o $@ $(real-= prereqs) + +$(obj)/%.livepatch: FORCE + $(call if_changed,livepatch) + +$(call multi-depend, $(filter %.livepatch,$(extra-y)), .livepatch, -objs) +targets +=3D $(sort $(foreach m,$(basename $(notdir $(filter %.livepatch,$= (extra-y)))), \ + $($(m)-objs))) + +LIVEPATCHES :=3D $(filter %.livepatch,$(extra-y)) + +LIVEPATCH_DEBUG_DIR ?=3D $(DEBUG_DIR)/xen-livepatch =20 .PHONY: livepatch -livepatch: $(LIVEPATCH) $(LIVEPATCH_BYE) $(LIVEPATCH_REPLACE) $(LIVEPATCH_= NOP) $(LIVEPATCH_NO_XEN_BUILDID) \ - $(LIVEPATCH_PREPOST_HOOKS) $(LIVEPATCH_PREPOST_HOOKS_FAIL) $(LI= VEPATCH_ACTION_HOOKS) \ - $(LIVEPATCH_ACTION_HOOKS_NOFUNC) $(LIVEPATCH_ACTION_HOOKS_MARKE= R) $(LIVEPATCH_ACTION_HOOKS_NOAPPLY) \ - $(LIVEPATCH_ACTION_HOOKS_NOREVERT) $(LIVEPATCH_EXPECTATIONS) $(= LIVEPATCH_EXPECTATIONS_FAIL) +livepatch: $(LIVEPATCHES) + +install: $(addprefix $(obj)/,$(LIVEPATCHES)) + $(INSTALL_DIR) $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) + $(INSTALL_DATA) $(addprefix $(obj)/,$(LIVEPATCHES)) $(DESTDIR)$(LIVEPATCH= _DEBUG_DIR) + +uninstall: + cd $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) && rm -f $(LIVEPATCHES) + +.PHONY: clean +clean:: + rm -f *.o .*.o.d *.livepatch config.h expect_config.h --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637847663; cv=none; d=zohomail.com; s=zohoarc; b=T0dZHJju6xmwa8YFusv481tBmq3a93QFkNDbraFIMDsjdfoGhtZqt+JUaEoaKcRB6tWMhWUBjxMwOYWGDHFSWU0x9AMPJXQYYxQ64lw8+y1jWfHu5uwW0uGHtIVa/w5EYPYGzUuVml6joUPaAYOKjZPRi0U6vVNagcFXdmMP3as= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847663; 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=+BInPFFZRfjRDNKEGHJ7hw3GqeLiRIDFAihlg3wkhfk=; b=nPyVYmy6WlhpQUArcyGIWNX2g2lceK1VAy1ZtQdMWq7k6aSV7bITfw3AXv4VF9n2f8vVyAOKCX2RBs81XpSnb5H/V0Dab1c1YkmHEj1yf+uygmYlLKqVuAcoPYOvC6CNwpXSsGOTCRmcP4qKzYGU/YQVRFwEksDIuxhNuIThsTs= 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 1637847663498424.1893764293035; Thu, 25 Nov 2021 05:41:03 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231219.400030 (Exim 4.92) (envelope-from ) id 1mqEzb-00021o-6R; Thu, 25 Nov 2021 13:40:51 +0000 Received: by outflank-mailman (output) from mailman id 231219.400030; Thu, 25 Nov 2021 13:40:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqEza-0001xZ-QY; Thu, 25 Nov 2021 13:40:50 +0000 Received: by outflank-mailman (input) for mailman id 231219; Thu, 25 Nov 2021 13:40:49 +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 1mqEzZ-00076i-4Z for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:49 +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 4b2ead47-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:40:48 +0100 (CET) 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: 4b2ead47-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847648; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OgGxNUfTQ2JG3WE+K8Owl04Bu0uYkAMbFk7jPFHWrPo=; b=Uw0rQ7b3ilHxr7stkyJ8O8caq9dzwBHBgW7UXFAY2kml+2h6cUAuQSuU HKC01iDMZpe63j9rNsAbiPk+APSkkJDfbqlCoZ2YBbWCexJ3XcuDCId+c CrbHjrddoof8o3K2zV3gmxxs/sGX4rSxcwpYAgiTLfBXlxirJZJUEoJRe I=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: KSNc1dI5ExpTV/1MPsgOULNRZw225xUwZIjvU9nt3iDvGnfdJ6cb15yX7fjJerBQ4V2SJ/dLz+ tLTz91lKUZxscFUCtLFZ4FbOMiUx+CmyjQt63Uf7XhlRehB65bv0pQC9Qh09mj5yQUlMMbNDCf XLQXPuhkZhaiXgbPPJwoG3DR0wAwNFW+3sxkTmiI6IfSP8CneXIwAziM4WxuZxws0A0CHOB0pU N7iP86ryqudAOXpB2ngjTVj7vOKmWQidnuhsv6IpggKhnjhaIhntSlgB7eJvCnQdRVaMWJYZJI a9sEd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d8uxzpUQaKfzrV+rPcv1FaYVreQmM8UlGPBDLgD+ywRh8wPtha P93lPpA6l5AV8xaIMeeHb9BgdfHOAhirY8seXwL50v+iufPDJJkYbwELEGPfogEAFCs+23oH yJkH5LSkX13CbSmCgGOqNJ7BQ1afBATWMGtw+QKJ7HrH+aTMDx4YxMn6eh6ININcmU8vrqgw 0xRrWcEkgei3iOedl3RAp2hAZu2NatCQbsAFXREFT6VN7ILO+5DNY8TKMk6e6cJ7utmwaImR vUJYZzYUP9OVi7G63IWapyk9N5ucxGihASvOSu5YWdgI848FlKRotK0LBHy8CQuDzassZdsq bOXyQ6GE4EIQB5vDZiKZav3nU+xp3UUhMl7Q1DMfotIYEzp/YUzc37xg/Y7LtsiMxLGwjfGh Q+aDQ1B/bvGopMv8cmPjqeB9t/7H+x7F0tcPm/a8bfpanWKojv9mddNCb/acyrcWWX4/LSZS d9Ul/ysYucamFtqspZnF+o5x6wJ+Nay9aRRyR5pHSuXYg3zWK9gOHSPweJGqrZJmu1CoQKzV 0+CpotaNLGONJ+3GVIdPlN4POGK1PVSkTjO9/UlZk794XYvrraAVExTOTiKiTBcc+QpYN90n 795tZ5E8RG7hzorLs2C33Jd+Gm7J3AdV7kq68MBC4jxhwt3klxPbPQw0MMtDE1jvzmUDnQXH w== IronPort-HdrOrdr: A9a23:pxLSV6zF6xMS5LEfwSIrKrPwKr1zdoMgy1knxilNoRw8SKOlfq eV7ZMmPH7P+U8ssR4b+OxoVJPsfZqYz+8W3WBzB8bHYOCFgguVxehZhOOIqQEIWReOk9K1vZ 0QFZSWY+efMbEVt6rHCXGDYrUd/OU= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58135422" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 10/47] build: rework cloc recipe Date: Thu, 25 Nov 2021 13:39:29 +0000 Message-ID: <20211125134006.1076646-11-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847665498100005 Content-Type: text/plain; charset="utf-8" We are going to make other modifications to the cloc recipe, so this patch prepare make those modification easier. We replace the Makefile meta programming by just a shell script which should be easier to read and is actually faster to execute. Instead of looking for files in "$(BASEDIR)", we use "." which is give the same result overall. We also avoid the need for a temporary file as cloc can read the list of files from stdin. No change intended to the output of `cloc`. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v8: - rework cloc patch, move it ahead of problematic changes this is only a convertion to shell script with a single other change. xen/Makefile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 7bb3595d649f..6afae6ced37c 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -477,14 +477,12 @@ _MAP: =20 .PHONY: cloc cloc: - $(eval tmpfile :=3D $(shell mktemp)) - $(foreach f, $(shell find $(BASEDIR) -name *.o.d), \ - $(eval path :=3D $(dir $(f))) \ - $(eval names :=3D $(shell grep -o "[a-zA-Z0-9_/-]*\.[cS]" $(f))) \ - $(foreach sf, $(names), \ - $(shell if test -f $(path)/$(sf) ; then echo $(path)/$(sf) >> $(tmpfile= ); fi;))) - cloc --list-file=3D$(tmpfile) - rm $(tmpfile) + find . -name '*.o.d' | while read f; do \ + for sf in $$(grep -o "[a-zA-Z0-9_/-]*\.[cS]" $$f); do \ + sf=3D"$$(dirname $$f)/$$sf"; \ + test -f "$$sf" && echo "$$sf"; \ + done; \ + done | cloc --list-file=3D- =20 endif #config-build =20 --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637847668; cv=none; d=zohomail.com; s=zohoarc; b=QOq2WyUau9mQkDML48pMxHKRURmWCMMpFtLnBAdkrYBZ1Ojxnl9D34wbD8SUMlhZnktq2GkiL2rTRGvQgwNTLHI/OVQwJAOqDYdo1U43gmjem6Q0ytajhyR/DA5CaFyeqB93iLVg61jLCOHYFd6ntK4XCFKodunOc2l8rdoI45U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637847668; 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=R+KYXyah84IrArpQpTsslsgWu5UBFvF1ufTRL6MQU/E=; b=kq9D1jzqsiUbtDatJy1sY4vc3HQxG31BLvDooFDAiI/hGmNSUHW0+bR8+D7sdQwkc0yEe00v4kuPXj4AR8rXjhJ8JsKDEZzeJnrDU1J9vjyrZkcgOJAIsinGVhRQwlsc1UGMQ3gUDRaYv3LdXda8mwPTkKJVP8g2xrEGV/lL5/M= 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 163784766884118.288864468488327; Thu, 25 Nov 2021 05:41:08 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231222.400042 (Exim 4.92) (envelope-from ) id 1mqEzc-0002NT-TA; Thu, 25 Nov 2021 13:40:52 +0000 Received: by outflank-mailman (output) from mailman id 231222.400042; Thu, 25 Nov 2021 13:40: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 1mqEzc-0002Ld-Gv; Thu, 25 Nov 2021 13:40:52 +0000 Received: by outflank-mailman (input) for mailman id 231222; Thu, 25 Nov 2021 13:40:51 +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 1mqEza-0007NX-U2 for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:51 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 4ce00f25-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:40:49 +0100 (CET) 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: 4ce00f25-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847649; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PgvyZbdOc3nlYaOvddtDU/TV6+mitJD45Z6mpY4t0+Y=; b=gw5BkUtrm+K1w0LNcY8wZqbOHCdgESfaA6poLkDdclBNxv+5HwxslTsx p7+xMLwOBAid3rBrJLXPL0lStab/3eq6g3ATBgUUCwUlzJxTUcD0hjM7l +TzBUvw3k9XhBJZ4UCHThvltBy+eOiaXTdbH49lFYTQ9u+z+LvlFf+DUR U=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: ZgxPPqrL9KXwdxCsv/YWw3ZHYfABpvGidD0NkFHjRTeTlbxMZFtGLMYYEPoHYU1CZ52DEfpdV4 nBP5LUWMLpkCtLxk8AUiYWPGzQlSnHVkbJdJTMJB0BBxqve1vgPKtMnE7HWczIeGqWVQWZicJg 9qPPMvfbUeosfhY/7/HCSmsoabM73DEoLOdIMhMQDlt0A1vU/EEMxc8pYo3N2K4OEd3tRChI0h NZ5W7tIS7eNviWHMhivR0UjOJi7Y/ynZESIfmdLq3zujQUQQbmp1EoR2kkyh0XUzqaneeqPEnJ FY06UrZhhw0lyn5/YuiOiSTX X-SBRS: 5.1 X-MesageID: 60634112 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:GQLaNKnIcGGtk3VOCDthRW/o5gx8IURdPkR7XQ2eYbSJt1+Wr1Gzt xJJDG2Gbv+KZjH9e4okYYi2pEIDu8TWztNrHFZtqHs3QiMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BClVlxJVF/fngqoDUUYYoAQgsA187IMsdoUg7wbdg29Q12YLR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 PdmkIOJEQslAvPdoM4FSSFDMzNOHLITrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBMDtIIMYvGAm1TzDBOwqaZvCX7/L9ZlT2zJYasVmQ66AP JZAMGAHgBLoMzxuKnpUB8kFnuLr1yLxbgZakBWNqv9ii4TU5FMoi+W8WDbPQfSIWMFUk0Cwt m/AuWPjDXkyL8eDwDCI9natgO7nni7hXo8WUrqi+ZZCn1m71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YG7skDTtV00zEX/kB9WHVpmszxra 6TdZMgpHnJYVcqKQkdcL+7WJVoLUmxyXcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyIMbEQt6fHCWeDfOrIuOP3kpyVuQ== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634112" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 11/47] build: fix enforce unique symbols for recent clang version Date: Thu, 25 Nov 2021 13:39:30 +0000 Message-ID: <20211125134006.1076646-12-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637847670737100001 Content-Type: text/plain; charset="utf-8" clang 6.0 and newer behave like gcc in regards for the FILE symbol, so only the filename rather than the full path to the source file. clang 3.8.1-24 (in our debian:stretch container) and 3.5.0-10 (in our debian:jessie container) do store the full path to the source file in the FILE symbol. This means that we also need to check clang version to figure out which command we need to use to redefine symbol. I don't know which version of clang change behavior, we will guess 4.0. Signed-off-by: Anthony PERARD --- "enforce unique symbols" works by chance with recent clang version. The few object built from source in subdir don't pose an issue. With checking for 4.0 or newer, build may fails with a version of clang between 4.0 and 6.0. With checking for 6.0 or newer, no build fails, but maybe that will happen later with patch "build: build everything from the root dir, use obj=3D$subdir" applied. --- Notes: v8: - new patch, extracted from "build: build everything from the root dir,= use obj=3D$subdir" xen/Rules.mk | 2 +- xen/scripts/Kbuild.include | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 60d1d6c4f583..14b6e7fdd721 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -166,7 +166,7 @@ SRCPATH :=3D $(patsubst $(BASEDIR)/%,%,$(CURDIR)) quiet_cmd_cc_o_c =3D CC $@ ifeq ($(CONFIG_ENFORCE_UNIQUE_SYMBOLS),y) cmd_cc_o_c =3D $(CC) $(c_flags) -c $< -o $(dot-target).tmp -MQ $@ - ifeq ($(CONFIG_CC_IS_CLANG),y) + ifeq ($(CONFIG_CC_IS_CLANG)$(call clang-ifversion,-lt,400,y),yy) cmd_objcopy_fix_sym =3D $(OBJCOPY) --redefine-sym $<=3D$(SRCPATH)/= $< $(dot-target).tmp $@ else cmd_objcopy_fix_sym =3D $(OBJCOPY) --redefine-sym $( (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 1637848038266503.8061016050392; Thu, 25 Nov 2021 05:47:18 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231236.400079 (Exim 4.92) (envelope-from ) id 1mqF5T-0006JR-5N; Thu, 25 Nov 2021 13:46:55 +0000 Received: by outflank-mailman (output) from mailman id 231236.400079; Thu, 25 Nov 2021 13:46:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5T-0006JI-0W; Thu, 25 Nov 2021 13:46:55 +0000 Received: by outflank-mailman (input) for mailman id 231236; Thu, 25 Nov 2021 13:46:54 +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 1mqEzg-00076i-HL for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:56 +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 4ee1c6e0-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:40:54 +0100 (CET) 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: 4ee1c6e0-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847654; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6aFvX1K0ps1SE2Z1HJ19FTG5zY4QeP/HidoaiFAYelY=; b=XpxhcAPtVTg3N04I/znm9RmPDybs/GS8xD24UAPC0XKhS2jgAfrztl2S iQHEjmmtozhaz9c4BSiWJyRot2leMRg1qpUhMweU5MS5cvK3Q1uQ7gj0u x28PV4NJN3aIexO37AA/i+RAj7dh4uEgX5CVgAW0nhO5+BIZMwPVYE8Az g=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 84eS3mYjsH1lKGOHZUWBUz3eVqF1rkjyf1O7zjPFeY+cAn9malnUmxGv0kSbmeiVW+rP99QvGD 1uYumVxiSbzPCcUc3JWEtbcV2ZI7PXmhhVHx5kYZ0u5okhc1yNh8z1yQ+apD60caNGQUBR5cN3 ENhk3w9ndzmgY5OpHsT0V2ePQprD44s82SrfjuvtP2geIKSp40qCpy4+wjGG9oU7C/SmRpCVof e5ZX4jamsifCWe7kw6tF8xdwzQ75r4dEVItzNIWWYPoTt6+SXlsAhTdUSVKCaWz0TXBe1jjkdZ 2PqIpptWFWhi/y6vucdSM/s0 X-SBRS: 5.1 X-MesageID: 58135441 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:AI2o8KkbFDTEq140YUzGHLno5gxBIERdPkR7XQ2eYbSJt1+Wr1Gzt xJOCDuHaPfeMzf1Ldt3a4m1pEMC7MXcy4M2GVM++H1gEyM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R0beUN5oLPdnHAEQ3LcJfkVwbGAtLl6Mcc hX9U5/casmjsxyek9jnUbHzrZZ5aDOgjh+UMiyubVAXJsA7GFOWq4+0L1GxpUHi6xZbUuNk/ dWdOv7zG8JfF2yO8u6KAB5Q879BlSdEw78jN6c5CtJSZF/t4OBXx9/Z1ZcKzzU3AUybnFOyj l/OaT9B/LWli9JlobHh2PHfx6/0QrQWI6avNzSChVpAHXKBpTTLLE4peLvgQA0xo0uoovj/P rsMkKmnWBDF9X4T27dB/39Q5fpWz7PSS3Vyk2yIxV3HMAamDK1OOH6D0ZUdv6FB3OYB6wC3R liO6p9RPrDQYJHpF1sYJQwEaOWf1K5LxmmOvKpteEiqtjVq+LenUFlJO0XegiJqM7YoYpgux v0suZBK5lXn2AYqKNuPkgtd63+Ici4bS6wiu5xDWN3rhwMnx0tse5vZDiOqspiDZ88VahshI yOOhbqEjLNZnxKQf302HHnL/OxcmZVR50wakA5cfwyEw4OXiOU20Rtd9SUMYj5UlhgXgfhuP mVLNlFuIfnc9Tlfm8UeDXunHBtMBUPF9xWpmUcJjmDQU2KhSnfJcD8mIe+I8U0UrzBcczxc8 O3KwWrpS2+3LsT43y90Uk95sf3zC9d281SaysygGs2EGbg8YCbk3fDyNTZZ9UO/DJNjnlDDq Mlr4P10OP/yOiMnqqEmD5WXiOYLQxeeKW0eGfxs8cvlx40HlO1eDdRWF32MRw== IronPort-HdrOrdr: A9a23:GO2MdqyTN1AZmq/eXhUQKrPwFL1zdoMgy1knxilNoRw8SKKlfq eV7ZImPH7P+U4ssR4b+exoVJPtfZqYz+8R3WBzB8bEYOCFghrKEGgK1+KLqFeMJ8S9zJ846U 4JSdkGNDSaNzlHZKjBjzVQa+xQouW6zA== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58135441" From: Anthony PERARD To: CC: Anthony PERARD , Bob Eshleman , Andrew Cooper , "George Dunlap" , Ian Jackson , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Volodymyr Babchuk , Bertrand Marquis , Alistair Francis , Connor Davis , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Konrad Rzeszutek Wilk , "Ross Lagerwall" , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v8 12/47] build: build everything from the root dir, use obj=$subdir Date: Thu, 25 Nov 2021 13:39:31 +0000 Message-ID: <20211125134006.1076646-13-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848040677100003 Content-Type: text/plain; charset="utf-8" A subdirectory is now built by setting "$(obj)" instead of changing directory. "$(obj)" should always be set when using "Rules.mk" and thus a shortcut "$(build)" is introduced and should be used. A new variable "$(need-builtin)" is introduce. It is to be used whenever a "built_in.o" is wanted from a subdirectory. "built_in.o" isn't the main target anymore, and thus only needs to depends on the objects that should be part of "built_in.o". Introduce $(srctree) and $(objtree) to replace $(BASEDIR) in cases a relative path is better, and $(abs_srctree) and $(abs_objtree) which have an absolute path. DEPS is updated as the existing macro to deal with it doesn't know about $(obj). There's some changes in "Rules.mk" which in addition to deal with "$(obj)" also make it's looks more like "Makefile.build" from Linux v5.12. test/Makefile doesn't need special handling in order to build everything under test/, Rules.mk will visit test/livepatch via $(subdir-y), thus "tests" "all" and "build" target are removed. "subtree-force-update" target isn't useful so it is removed as well. test/livepatch/Makefile doesn't need default target anymore, Rules.mk will build everything in $(extra-y) and thus all *.livepatch. Adjust cloc recipe: dependency files generated by CC will now have the full path to the source file, so we don't need to prepend the subdirectory. This fix some issue with source not been parsed by cloc before. Also source from tools/kconfig would be listed with changes in this patch so adjust the find command to stop listing the "tools" directory and thus kconfig. With a default build of Xen on X86, they are a few new files parsed by cloc: arch/x86/x86_64/compat/mm.c arch/x86/x86_64/mm.c common/compat/domain.c common/compat/memory.c common/compat/xlat.c Signed-off-by: Anthony PERARD Acked-by: Bob Eshleman Acked-by: Julien Grall Reviewed-by: Jan Beulich --- Notes: v8: - rebased - move check for $(obj) in Rules.mk earlier - use $(sort ) when adding directories in $(subdir-y) - fix missing space between "DEPS" and ":=3D" - use -iquote when adding '.' for xen/arch/x86/usercopy.o - introduce also abs_srctree and abs_objtree those were in patch "build: replace $(BASEDIR) by $(objtree)" - reworked cmd_objcopy_fix_sym, we don't need to do anything for old version of clang, and for recent version of clang the change is the same a for gcc. - adjust "cloc" recipe - add some more $(Q) to silent $(MAKE) $(build)=3D... =20 v7: - Spell "Makefile.build" as "Rules.mk" in the warning in Rules.mk about undefined $(obj). - use $(srctree) for include/xen/config.h - handle $(nocov-y) and $(noubsan-y), needed to add $(obj)/ xen/Makefile | 36 ++++++---- xen/Rules.mk | 138 ++++++++++++++++++++++++------------ xen/arch/arm/Makefile | 4 +- xen/arch/arm/Rules.mk | 5 -- xen/arch/arm/arch.mk | 4 +- xen/arch/riscv/arch.mk | 4 +- xen/arch/x86/Makefile | 11 +-- xen/arch/x86/Rules.mk | 4 +- xen/arch/x86/arch.mk | 12 ++-- xen/arch/x86/boot/Makefile | 8 +-- xen/build.mk | 12 +++- xen/include/Makefile | 6 +- xen/scripts/Kbuild.include | 6 ++ xen/test/Makefile | 7 +- xen/test/livepatch/Makefile | 6 -- xen/xsm/flask/Makefile | 2 +- xen/xsm/flask/ss/Makefile | 2 +- 17 files changed, 162 insertions(+), 105 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 6afae6ced37c..88997244368c 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -22,6 +22,15 @@ export CHECKPOLICY ?=3D checkpolicy export BASEDIR :=3D $(CURDIR) export XEN_ROOT :=3D $(BASEDIR)/.. =20 +abs_objtree :=3D $(CURDIR) +abs_srctree :=3D $(CURDIR) + +export abs_srctree abs_objtree + +srctree :=3D . +objtree :=3D . +export srctree objtree + # Do not use make's built-in rules and variables MAKEFLAGS +=3D -rR =20 @@ -47,7 +56,7 @@ export KCONFIG_CONFIG ?=3D .config =20 export CC CXX LD =20 -export TARGET :=3D $(BASEDIR)/xen +export TARGET :=3D xen =20 .PHONY: default default: build @@ -250,7 +259,7 @@ endif CFLAGS +=3D -nostdinc -fno-builtin -fno-common CFLAGS +=3D -Werror -Wredundant-decls -Wno-pointer-arith $(call cc-option-add,CFLAGS,CC,-Wvla) -CFLAGS +=3D -pipe -D__XEN__ -include $(BASEDIR)/include/xen/config.h +CFLAGS +=3D -pipe -D__XEN__ -include $(srctree)/include/xen/config.h CFLAGS-$(CONFIG_DEBUG_INFO) +=3D -g =20 ifneq ($(CONFIG_CC_IS_CLANG),y) @@ -352,10 +361,10 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) =20 .PHONY: tests tests: - $(MAKE) -f $(BASEDIR)/Rules.mk -C test tests + $(Q)$(MAKE) $(build)=3Dtest .PHONY: install-tests install-tests: - $(MAKE) -f $(BASEDIR)/Rules.mk -C test install + $(Q)$(MAKE) $(build)=3Dtest install =20 .PHONY: _uninstall _uninstall: D=3D$(DESTDIR) @@ -411,16 +420,16 @@ $(TARGET).gz: $(TARGET) =20 $(TARGET): FORCE $(MAKE) -C tools - $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h + $(Q)$(MAKE) $(build)=3D. include/xen/compile.h [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch])= ; \ do test -r arch/$(TARGET_ARCH)/efi/$$f || \ ln -nsf ../../../common/efi/$$f arch/$(TARGET_ARCH)/efi/; \ done; \ true - $(MAKE) -f $(BASEDIR)/Rules.mk -C include - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) include - $(MAKE) -f $(BASEDIR)/Rules.mk arch/$(TARGET_ARCH)/include/asm/asm-offset= s.h - $(MAKE) -f $(BASEDIR)/Rules.mk $@ + $(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)=3D. $@ =20 SUBDIRS =3D xsm arch/$(TARGET_ARCH) common drivers lib test define all_sources @@ -467,19 +476,18 @@ _MAP: $(NM) -n $(TARGET)-syms | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|= \(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map =20 %.o %.i %.s: %.c FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + $(Q)$(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 %.o %.s: %.S FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + $(Q)$(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 %/: FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o + $(Q)$(MAKE) $(build)=3D$* need-builtin=3D1 =20 .PHONY: cloc cloc: - find . -name '*.o.d' | while read f; do \ + find . -name tools -prune -o -name '*.o.d' -print | while read f; do \ for sf in $$(grep -o "[a-zA-Z0-9_/-]*\.[cS]" $$f); do \ - sf=3D"$$(dirname $$f)/$$sf"; \ test -f "$$sf" && echo "$$sf"; \ done; \ done | cloc --list-file=3D- diff --git a/xen/Rules.mk b/xen/Rules.mk index 14b6e7fdd721..32a97e012060 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -3,19 +3,29 @@ # Makefile and are consumed by Rules.mk # =20 -obj :=3D . +ifndef obj +$(warning kbuild: Rules.mk is included improperly) +endif + src :=3D $(obj) =20 +PHONY :=3D __build +__build: + -include $(BASEDIR)/include/config/auto.conf =20 include $(XEN_ROOT)/Config.mk include $(BASEDIR)/scripts/Kbuild.include =20 # Initialise some variables +obj-y :=3D lib-y :=3D targets :=3D +subdir-y :=3D CFLAGS-y :=3D AFLAGS-y :=3D +nocov-y :=3D +noubsan-y :=3D =20 SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16, \ $(foreach w,1 2 4, \ @@ -50,27 +60,54 @@ cmd_objcopy =3D $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ quiet_cmd_binfile =3D BINFILE $@ cmd_binfile =3D $(SHELL) $(BASEDIR)/tools/binfile $(BINFILE_FLAGS) $@ $(2) =20 -define gendep - ifneq ($(1),$(subst /,:,$(1))) - DEPS +=3D $(dir $(1)).$(notdir $(1)).d - endif -endef -$(foreach o,$(filter-out %/,$(obj-y) $(obj-bin-y) $(extra-y)),$(eval $(cal= l gendep,$(o)))) +# Figure out what we need to build from the various variables +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D + +# Libraries are always collected in one lib file. +# Filter out objects already built-in +lib-y :=3D $(filter-out $(obj-y), $(sort $(lib-y))) + +# Subdirectories we need to descend into +subdir-y :=3D $(sort $(subdir-y) $(patsubst %/,%,$(filter %/, $(obj-y)))) =20 # Handle objects in subdirs -# ------------------------------------------------------------------------= --- -# o if we encounter foo/ in $(obj-y), replace it by foo/built_in.o -# and add the directory to the list of dirs to descend into: $(subdir-y) -subdir-y :=3D $(subdir-y) $(filter %/, $(obj-y)) +# - if we encounter foo/ in $(obj-y), replace it by foo/built_in.o +ifdef need-builtin obj-y :=3D $(patsubst %/, %/built_in.o, $(obj-y)) +else +obj-y :=3D $(filter-out %/, $(obj-y)) +endif =20 -# $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to -# tell kbuild to descend -subdir-obj-y :=3D $(filter %/built_in.o, $(obj-y)) +# Add subdir path =20 -# Libraries are always collected in one lib file. -# Filter out objects already built-in -lib-y :=3D $(filter-out $(obj-y), $(sort $(lib-y))) +extra-y :=3D $(addprefix $(obj)/,$(extra-y)) +targets :=3D $(addprefix $(obj)/,$(targets)) +lib-y :=3D $(addprefix $(obj)/,$(lib-y)) +obj-y :=3D $(addprefix $(obj)/,$(obj-y)) +obj-bin-y :=3D $(addprefix $(obj)/,$(obj-bin-y)) +subdir-y :=3D $(addprefix $(obj)/,$(subdir-y)) +nocov-y :=3D $(addprefix $(obj)/,$(nocov-y)) +noubsan-y :=3D $(addprefix $(obj)/,$(noubsan-y)) + +# subdir-builtin may contain duplications. Use $(sort ...) +subdir-builtin :=3D $(sort $(filter %/built_in.o, $(obj-y))) + +targets-for-builtin :=3D $(extra-y) + +ifneq ($(strip $(lib-y)),) + targets-for-builtin +=3D $(obj)/lib.a +endif + +ifdef need-builtin + targets-for-builtin +=3D $(obj)/built_in.o + ifneq ($(strip $(obj-bin-y)),) + ifeq ($(CONFIG_LTO),y) + targets-for-builtin +=3D $(obj)/built_in_bin.o + endif + endif +endif + +targets +=3D $(targets-for-builtin) =20 $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS-y +=3D -DINIT_= SECTIONS_ONLY =20 @@ -122,29 +159,28 @@ quiet_cmd_cc_builtin =3D CC $@ cmd_cc_builtin =3D \ $(CC) $(XEN_CFLAGS) -c -x c /dev/null -o $@ =20 +# To build objects in subdirs, we need to descend into the directories +$(subdir-builtin): $(obj)/%/built_in.o: $(obj)/% ; + quiet_cmd_ld_builtin =3D LD $@ ifeq ($(CONFIG_LTO),y) cmd_ld_builtin =3D \ - $(LD_LTO) -r -o $@ $(filter $(obj-y),$(real-prereqs)) + $(LD_LTO) -r -o $@ $(real-prereqs) else cmd_ld_builtin =3D \ - $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$(real-prereqs)) + $(LD) $(XEN_LDFLAGS) -r -o $@ $(real-prereqs) endif =20 -built_in.o: $(obj-y) $(if $(strip $(lib-y)),lib.a) $(extra-y) FORCE +$(obj)/built_in.o: $(obj-y) FORCE $(call if_changed,$(if $(strip $(obj-y)),ld_builtin,cc_builtin)) =20 -lib.a: $(lib-y) FORCE +$(obj)/lib.a: $(lib-y) FORCE $(call if_changed,ar) =20 -targets +=3D built_in.o -ifneq ($(strip $(lib-y)),) -targets +=3D lib.a -endif -targets +=3D $(filter-out $(subdir-obj-y), $(obj-y) $(lib-y)) $(extra-y) -targets +=3D $(MAKECMDGOALS) +targets +=3D $(filter-out $(subdir-builtin), $(obj-y)) +targets +=3D $(lib-y) $(MAKECMDGOALS) =20 -built_in_bin.o: $(obj-bin-y) $(extra-y) +$(obj)/built_in_bin.o: $(obj-bin-y) ifeq ($(strip $(obj-bin-y)),) $(CC) $(a_flags) -c -x assembler /dev/null -o $@ else @@ -155,23 +191,15 @@ endif PHONY +=3D FORCE FORCE: =20 -%/built_in.o %/lib.a: FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o - -%/built_in_bin.o: FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in_bin.o - -SRCPATH :=3D $(patsubst $(BASEDIR)/%,%,$(CURDIR)) - quiet_cmd_cc_o_c =3D CC $@ ifeq ($(CONFIG_ENFORCE_UNIQUE_SYMBOLS),y) cmd_cc_o_c =3D $(CC) $(c_flags) -c $< -o $(dot-target).tmp -MQ $@ - ifeq ($(CONFIG_CC_IS_CLANG)$(call clang-ifversion,-lt,400,y),yy) - cmd_objcopy_fix_sym =3D $(OBJCOPY) --redefine-sym $<=3D$(SRCPATH)/= $< $(dot-target).tmp $@ + ifneq ($(CONFIG_CC_IS_CLANG)$(call clang-ifversion,-lt,400,y),yy) + cmd_objcopy_fix_sym =3D \ + $(OBJCOPY) --redefine-sym $( .lds quiet_cmd_cpp_lds_S =3D LDS $@ cmd_cpp_lds_S =3D $(CPP) -P $(call cpp_flags,$(a_flags)) -D__LINKER__ -MQ = $@ -o $@ $< =20 +targets :=3D $(filter-out $(PHONY), $(targets)) + # Add intermediate targets: # When building objects with specific suffix patterns, add intermediate # targets that the final targets are derived from. @@ -239,7 +269,18 @@ intermediate_targets =3D $(foreach sfx, $(2), \ # %.init.o <- %.o targets +=3D $(call intermediate_targets, .init.o, .o) =20 --include $(DEPS_INCLUDE) +# Build +# ------------------------------------------------------------------------= --- + +__build: $(targets-for-builtin) $(subdir-y) + @: + +# Descending +# ------------------------------------------------------------------------= --- + +PHONY +=3D $(subdir-y) +$(subdir-y): + $(Q)$(MAKE) $(build)=3D$@ need-builtin=3D$(if $(filter $@/built_in.o, $(s= ubdir-builtin)),1) =20 # Read all saved command lines and dependencies for the $(targets) we # may be building above, using $(if_changed{,_dep}). As an @@ -250,6 +291,9 @@ existing-targets :=3D $(wildcard $(sort $(targets))) =20 -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) =20 +DEPS :=3D $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).d) +-include $(DEPS_INCLUDE) + # Declare the contents of the PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends. .PHONY: $(PHONY) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index c993ce72a341..fd24f0212ffa 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -95,12 +95,12 @@ $(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S - $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o + $(MAKE) $(build)=3D$(@D) $(@D)/.$(@F).0.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S - $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o + $(MAKE) $(build)=3D$(@D) $(@D)/.$(@F).1.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk index 290609487605..e69de29bb2d1 100644 --- a/xen/arch/arm/Rules.mk +++ b/xen/arch/arm/Rules.mk @@ -1,5 +0,0 @@ -# head.o is built by descending into arch/arm/$(TARGET_SUBARCH), depends o= n the -# part of $(ALL_OBJS) that will eventually recurse into $(TARGET_SUBARCH)/= and -# build head.o -arch/arm/$(TARGET_SUBARCH)/head.o: arch/arm/built_in.o -arch/arm/$(TARGET_SUBARCH)/head.o: ; diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index ba3f140e2ea7..4e3f7014305e 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -1,8 +1,8 @@ ######################################## # arm-specific definitions =20 -CFLAGS +=3D -I$(BASEDIR)/include -CFLAGS +=3D -I$(BASEDIR)/arch/$(TARGET_ARCH)/include +CFLAGS +=3D -I$(srctree)/include +CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include =20 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) $(call cc-option-add,CFLAGS,CC,-Wnested-externs) diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index 39ae6ffea94d..694ba053ceab 100644 --- a/xen/arch/riscv/arch.mk +++ b/xen/arch/riscv/arch.mk @@ -11,5 +11,5 @@ riscv-march-$(CONFIG_RISCV_ISA_C) :=3D $(riscv-marc= h-y)c # -mcmodel=3Dmedlow would force Xen into the lower half. =20 CFLAGS +=3D -march=3D$(riscv-march-y) -mstrict-align -mcmodel=3Dmedany -CFLAGS +=3D -I$(BASEDIR)/include -CFLAGS +=3D -I$(BASEDIR)/arch/$(TARGET_ARCH)/include +CFLAGS +=3D -I$(srctree)/include +CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index f9af39ba6138..6f18daf9105c 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -80,6 +80,9 @@ endif extra-y +=3D asm-macros.i extra-y +=3D xen.lds =20 +# Allows usercopy.c to include itself +$(obj)/usercopy.o: CFLAGS-y +=3D -iquote . + ifneq ($(CONFIG_HVM),y) $(obj)/x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label endif @@ -129,13 +132,13 @@ $(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort \ >$(@D)/.$(@F).0.S - $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).0.o + $(MAKE) $(build)=3D$(@D) efi-y=3D $(@D)/.$(@F).0.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-= y) \ >$(@D)/.$(@F).1.S - $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).1.o + $(MAKE) $(build)=3D$(@D) efi-y=3D $(@D)/.$(@F).1.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ @@ -199,14 +202,14 @@ endif $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).0= ) >$(@D)/.$(@F).0r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s= .S - $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s= .o + $(MAKE) $(build)=3D$(@D) efi-y=3D .$(@F).0r.o .$(@F).0s.o $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file_option) -= o $(@D)/.$(@F).$(base).1 &&) : $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).1= ) >$(@D)/.$(@F).1r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s= .S - $(MAKE) -f $(BASEDIR)/Rules.mk efi-y=3D $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s= .o + $(MAKE) $(build)=3D$(@D) efi-y=3D .$(@F).1r.o .$(@F).1s.o $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(note_file_option) -= o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index 56fe22c979ea..2d12c2dca208 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -2,9 +2,9 @@ # x86-specific definitions =20 ifneq ($(filter -DHAVE_AS_QUOTED_SYM,$(XEN_CFLAGS)),) -object_label_flags =3D '-D__OBJECT_LABEL__=3D$(subst $(BASEDIR)/,,$(CURDIR= ))/$@' +object_label_flags =3D '-D__OBJECT_LABEL__=3D$@' else -object_label_flags =3D '-D__OBJECT_LABEL__=3D$(subst /,$$,$(subst -,_,$(su= bst $(BASEDIR)/,,$(CURDIR))/$@))' +object_label_flags =3D '-D__OBJECT_LABEL__=3D$(subst /,$$,$(subst -,_,$@))' endif c_flags +=3D $(object_label_flags) $(CFLAGS-stack-boundary) a_flags +=3D $(object_label_flags) $(CFLAGS-stack-boundary) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index c830dc5b3a7c..5152de343082 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -3,10 +3,10 @@ =20 export XEN_IMG_OFFSET :=3D 0x200000 =20 -CFLAGS +=3D -I$(BASEDIR)/include -CFLAGS +=3D -I$(BASEDIR)/arch/$(TARGET_ARCH)/include -CFLAGS +=3D -I$(BASEDIR)/arch/x86/include/asm/mach-generic -CFLAGS +=3D -I$(BASEDIR)/arch/x86/include/asm/mach-default +CFLAGS +=3D -I$(srctree)/include +CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include +CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-generic +CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-default CFLAGS +=3D -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) =20 # Prevent floating-point variables from creeping into Xen. @@ -87,7 +87,7 @@ efi-nr-fixups :=3D $(shell $(OBJDUMP) -p $(efi-check-o:.o= =3D.efi) | grep '^[[:blank: ifeq ($(efi-nr-fixups),2) MKRELOC :=3D : else -MKRELOC :=3D efi/mkreloc +MKRELOC :=3D arch/x86/efi/mkreloc # If the linker produced fixups but not precisely two of them, we need to # disable it doing so. But if it didn't produce any fixups, it also would= n't # recognize the option. @@ -103,6 +103,6 @@ export EFI_LDFLAGS endif =20 # Set up the assembler include path properly for older toolchains. -CFLAGS +=3D -Wa,-I$(BASEDIR)/include +CFLAGS +=3D -Wa,-I$(srctree)/include =20 ALL_OBJS-y :=3D arch/x86/boot/built_in.o arch/x86/efi/built_in.o $(ALL_OBJ= S-y) diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 0aec8a464364..ba732e4a88c3 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -1,8 +1,8 @@ obj-bin-y +=3D head.o =20 -DEFS_H_DEPS =3D $(src)/defs.h $(BASEDIR)/include/xen/stdbool.h +DEFS_H_DEPS =3D $(abs_srctree)/$(src)/defs.h $(abs_srctree)/include/xen/st= dbool.h =20 -CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(src)/video.h \ +CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(abs_srctree)/$(src)/video.h \ $(BASEDIR)/include/xen/kconfig.h \ $(BASEDIR)/include/generated/autoconf.h =20 @@ -17,7 +17,7 @@ RELOC_DEPS =3D $(DEFS_H_DEPS) \ $(obj)/head.o: $(obj)/cmdline.S $(obj)/reloc.S =20 $(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) $(src)/build32.lds - $(MAKE) -f build32.mk -C $(obj) $(@F) CMDLINE_DEPS=3D"$(CMDLINE_DEPS)" + $(MAKE) -f $(abs_srctree)/$(src)/build32.mk -C $(obj) $(@F) CMDLINE_DEPS= =3D"$(CMDLINE_DEPS)" =20 $(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) $(src)/build32.lds - $(MAKE) -f build32.mk -C $(obj) $(@F) RELOC_DEPS=3D"$(RELOC_DEPS)" + $(MAKE) -f $(abs_srctree)/$(src)/build32.mk -C $(obj) $(@F) RELOC_DEPS=3D= "$(RELOC_DEPS)" diff --git a/xen/build.mk b/xen/build.mk index 740945333a97..bf0c9710241a 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -59,6 +59,16 @@ arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: asm-offse= ts.s echo ""; \ echo "#endif") <$< >$@ =20 +build-dirs :=3D $(patsubst %/built_in.o,%,$(filter %/built_in.o,$(ALL_OBJS= ) $(ALL_LIBS))) + +# The actual objects are generated when descending, +# make sure no implicit rule kicks in +$(sort $(ALL_OBJS) $(ALL_LIBS)): $(build-dirs) ; + +PHONY +=3D $(build-dirs) +$(build-dirs): FORCE + $(Q)$(MAKE) $(build)=3D$@ need-builtin=3D1 + ifeq ($(CONFIG_LTO),y) # Gather all LTO objects together prelink_lto.o: $(ALL_OBJS) $(ALL_LIBS) @@ -75,4 +85,4 @@ endif targets +=3D prelink.o =20 $(TARGET): prelink.o FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ + $(Q)$(MAKE) $(build)=3Darch/$(TARGET_ARCH) $@ diff --git a/xen/include/Makefile b/xen/include/Makefile index d2f5a956a11a..cd40d5b4c923 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -61,7 +61,7 @@ $(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/= .xlat/%.lst $(BASEDIR)/ export PYTHON=3D$(PYTHON); \ while read what name; do \ $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $< || exi= t $$?; \ - done <$(patsubst compat/%,compat/.xlat/%,$(basename $<)).lst >$@.new + done <$(patsubst $(obj)/compat/%,$(obj)/compat/.xlat/%,$(basename $<)).ls= t >$@.new mv -f $@.new $@ =20 .PRECIOUS: $(obj)/compat/.xlat/%.lst @@ -86,8 +86,8 @@ PUBLIC_HEADERS :=3D $(filter-out $(src)/public/arch-% $(s= rc)/public/dom0_ops.h, $( PUBLIC_C99_HEADERS :=3D $(src)/public/io/9pfs.h $(src)/public/io/pvcalls.h PUBLIC_ANSI_HEADERS :=3D $(filter-out $(src)/public/%ctl.h $(src)/public/x= sm/% $(src)/public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) =20 -public/io/9pfs.h-prereq :=3D string -public/io/pvcalls.h-prereq :=3D string +$(src)/public/io/9pfs.h-prereq :=3D string +$(src)/public/io/pvcalls.h-prereq :=3D string =20 $(obj)/headers.chk: $(PUBLIC_ANSI_HEADERS) $(src)/Makefile for i in $(filter %.h,$^); do \ diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index b4b77f85d8d5..a333c3961db6 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -61,6 +61,12 @@ cc-ifversion =3D $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $= (2)000 ] && echo $(3) || e =20 clang-ifversion =3D $(shell [ $(CONFIG_CLANG_VERSION)0 $(1) $(2)000 ] && e= cho $(3) || echo $(4)) =20 +### +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=3D +# Usage: +# $(Q)$(MAKE) $(build)=3Ddir +build :=3D -f $(srctree)/Rules.mk obj + # Shorthand for $(MAKE) clean # Usage: # $(MAKE) $(clean) dir diff --git a/xen/test/Makefile b/xen/test/Makefile index 41e4d7bdb78b..080763c80766 100644 --- a/xen/test/Makefile +++ b/xen/test/Makefile @@ -1,13 +1,10 @@ =20 -tests all: build - - ifneq ($(XEN_TARGET_ARCH),x86_32) # Xen 32-bit x86 hypervisor no longer supported, so has no test livepatches subdir-y +=3D livepatch endif =20 -install build subtree-force-update uninstall: %: +install uninstall: %: set -e; for s in $(subdir-y); do \ - $(MAKE) -f $(BASEDIR)/Rules.mk -C $$s $*; \ + $(MAKE) $(build)=3D$$s $*; \ done diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index 69fadccd01ea..afb8d589ecae 100644 --- a/xen/test/livepatch/Makefile +++ b/xen/test/livepatch/Makefile @@ -11,9 +11,6 @@ endif CODE_ADDR=3D$(shell nm --defined $(1) | grep $(2) | awk '{print "0x"$$1}') CODE_SZ=3D$(shell nm --defined -S $(1) | grep $(2) | awk '{ print "0x"$$2}= ') =20 -.PHONY: default -build default: livepatch - extra-y +=3D xen_hello_world.livepatch xen_hello_world-objs :=3D xen_hello_world_func.o xen_hello_world.o note.o = xen_note.o modinfo.o $(obj)/xen_hello_world.o: $(obj)/config.h @@ -156,9 +153,6 @@ LIVEPATCHES :=3D $(filter %.livepatch,$(extra-y)) =20 LIVEPATCH_DEBUG_DIR ?=3D $(DEBUG_DIR)/xen-livepatch =20 -.PHONY: livepatch -livepatch: $(LIVEPATCHES) - install: $(addprefix $(obj)/,$(LIVEPATCHES)) $(INSTALL_DIR) $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) $(INSTALL_DATA) $(addprefix $(obj)/,$(LIVEPATCHES)) $(DESTDIR)$(LIVEPATCH= _DEBUG_DIR) diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 51fd37f6c4d5..49cf730cf098 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -40,7 +40,7 @@ $(obj)/flask-policy.S: $(BASEDIR)/tools/binfile FORCE $(call if_changed,binfile,$(obj)/policy.bin xsm_flask_init_policy) targets +=3D flask-policy.S =20 -FLASK_BUILD_DIR :=3D $(CURDIR) +FLASK_BUILD_DIR :=3D $(abs_objtree)/$(obj) POLICY_SRC :=3D $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) =20 $(obj)/policy.bin: FORCE diff --git a/xen/xsm/flask/ss/Makefile b/xen/xsm/flask/ss/Makefile index d32b9e07138e..aba1339f3808 100644 --- a/xen/xsm/flask/ss/Makefile +++ b/xen/xsm/flask/ss/Makefile @@ -8,4 +8,4 @@ obj-y +=3D services.o obj-y +=3D conditional.o obj-y +=3D mls.o =20 -CFLAGS-y +=3D -I../include +CFLAGS-y +=3D -I$(srctree)/xsm/flask/include --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848104; cv=none; d=zohomail.com; s=zohoarc; b=ODWmrkKcu1VRmJbuafn59Z7sI6d+0942H1rCTkUKpR3ka3ghSD68IZ5xjf92zin/Sxg1aiXSuygZAMOSFa3aW1CvQo/MhfWQQNP/CQ0uD/ge0lE7vAuIoGS6TxwDQnzQLgPjcNvqTt3ftWomGUnnD2Cqa4DSYy83+r2/yT+HyzQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848104; 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=dhjgClXkvQK1XjUhQI1ffud+EjWQrh85FYGGupHQV0E=; b=TXMMnTc5BBBDAoKW4VQIyyQIzSn8AgE/kwJvgptK0A1y2rmoCm+uuJU4pqkjj2DJOONtpR7izmotaUxsPIK/YxSZ4b5O4RrolBwtNWsj+rf6yT4zc1B38F4y2ZOcY39TInujaXvIWrroL8lXWKDhaMBDU99Bolik2ppIafEGutk= 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 163784810478697.35548152156207; Thu, 25 Nov 2021 05:48:24 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231320.400399 (Exim 4.92) (envelope-from ) id 1mqF6f-0004AL-2n; Thu, 25 Nov 2021 13:48:09 +0000 Received: by outflank-mailman (output) from mailman id 231320.400399; Thu, 25 Nov 2021 13:48:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6d-00046J-Tw; Thu, 25 Nov 2021 13:48:07 +0000 Received: by outflank-mailman (input) for mailman id 231320; Thu, 25 Nov 2021 13:48:05 +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 1mqEzj-00076i-8W for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:40:59 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 50c12444-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:40:57 +0100 (CET) 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: 50c12444-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847657; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vux0wrGsqHked6kWXywCqhjKL8uNfjsd3EC09NZt2eI=; b=d5MnuiuvfGZzlQltrUGr6cjiYoaeh8CPARwuW3oCdMBlH25+aDn+9zgN qf5Gvu8VZvWw80SC3WqUYriGNb8a5Kn2IwyeouPE3TfNJhedcPPuGwgmY dAMsWigbpj1c+r+eKYZvLoIyHQ3KOhwRxHkP9eK2brViXlcCyXVnyiOBj w=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: S3k2p4uEUQc94Ma5o1wajrwzldEb4ZLhGi9GMf6HKc0Ea4D+L7z9jujn2/pMyyDxIhZcuUVKP+ sAqTGB+Fu5R5QhCtavy1rbsMuvwHONv1fSbu7P7gzb/3NLmRcZQz1HTqcJGLUFgenTARqjO9Ry sf5/yicQdL94ynOWa64V4m9YeKRAZY+TIN+iY9tQT3kKMSOWJ6XoN5dSAHho4+1sCz0F57XxqP bZJgmU5N9CYOiG6flbUWI9HvzshRB34owWx9TMrWUXWemRLXRipPtoModemg2yHel4+37g2UmV n1E+JTb8Pr34dzVI9rkJfgEk X-SBRS: 5.1 X-MesageID: 59005996 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:rLYtMKjyOuDPNKGHO8z/XhvBX161nRcKZh0ujC45NGQN5FlHY01je htvUDqPPv2JYjbyKY9xbIvj/BsBvsPQm9ZhSgA9pHpkFXwb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oAMKRCQ7InQLlbGILes1htZGEk0F0/NtTo5w7Rg29cy3IDja++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1LpZySTx8lI5GTv75FVTAGQ3p0AbRJreqvzXiX6aR/zmXDenrohf5vEFs3LcsT/eMf7WNmr KJCbmpXN1ba2rzwkOnTpupE36zPKOHiOp8fvXdxiynUF/88TbjIQrnQ5M8e1zA17ixLNauPP 5JEOGsxBPjGSxdGCno3KL0Bp8qlrCDGcScCtQLFn7VitgA/yyQuieOwYbI5YOeiR9hRn0uej nLL+SL+GB5yHMeE1TOP/3aoh+nOtSD2QoQfEPu/7PECqEKX7nweDlsRT1TTiem0jAuyVsxSL 2QQ+zEytu4i+UqzVN7/Uhak5nmesXY0WdBdDuk74wGl0bfP7kCSAW1sZj9eavQ2uckuXzso2 1SV2dTzClRSXKa9ECzHsO3O9HXrZHZTf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Vt6nHCXGDYrQd/OU= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="59005996" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v8 13/47] build: introduce if_changed_deps Date: Thu, 25 Nov 2021 13:39:32 +0000 Message-ID: <20211125134006.1076646-14-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848106062100003 Content-Type: text/plain; charset="utf-8" This macro does compare command line like if_changed, but it also rewrite the dependencies generated by $(CC) in order to depend on a CONFIG_* as generated by kconfig instead of depending on autoconf.h. This allow to make a change in kconfig options and only rebuild the object that uses that CONFIG_* option. cmd_and_record isn't needed anymore as it is replace by cmd_and_fixdep. There's only one .*.d dependency file left which is explicitly included as a workound, all the other are been absorb into the .*.cmd dependency files via `fixdep`. So including .*.d can be removed from the makefile. Also adjust "cloc" recipe due to .*.d been replace by .*.cmd files. This imports fixdep.c and if_changed_deps macro from Linux v5.12. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v8: - reviewd - remove "tools_fixdep" prerequisite in xen/Makefile from "$(TARGET)" target as the first command of the recipe will build everything in tools/ and thus tools/fixdep. - adjust "cloc" recipe. .gitignore | 1 + xen/Makefile | 15 +- xen/Rules.mk | 17 +- xen/arch/x86/Makefile | 8 +- xen/build.mk | 1 + xen/scripts/Kbuild.include | 17 +- xen/tools/Makefile | 7 +- xen/tools/fixdep.c | 404 +++++++++++++++++++++++++++++++++++++ 8 files changed, 441 insertions(+), 29 deletions(-) create mode 100644 xen/tools/fixdep.c diff --git a/.gitignore b/.gitignore index 841ba1c0a84c..58740c035789 100644 --- a/.gitignore +++ b/.gitignore @@ -339,6 +339,7 @@ xen/include/xen/lib/x86/cpuid-autogen.h xen/test/livepatch/config.h xen/test/livepatch/expect_config.h xen/test/livepatch/*.livepatch +xen/tools/fixdep xen/tools/kconfig/.tmp_gtkcheck xen/tools/kconfig/.tmp_qtcheck xen/tools/symbols diff --git a/xen/Makefile b/xen/Makefile index 88997244368c..d38425234c6c 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -196,6 +196,13 @@ export XEN_HAS_CHECKPOLICY :=3D $(call success,$(CHECK= POLICY) -h 2>&1 | grep -q xe export root-make-done :=3D y endif # root-make-done =20 +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D +# Rules shared between *config targets and build targets + +PHONY +=3D tools_fixdep +tools_fixdep: + $(MAKE) -C tools fixdep + # Shorthand for kconfig kconfig =3D -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SR= CARCH=3D$(SRCARCH) HOSTCC=3D"$(HOSTCC)" HOSTCXX=3D"$(HOSTCXX)" =20 @@ -475,18 +482,18 @@ cscope: _MAP: $(NM) -n $(TARGET)-syms | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|= \(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map =20 -%.o %.i %.s: %.c FORCE +%.o %.i %.s: %.c tools_fixdep FORCE $(Q)$(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 -%.o %.s: %.S FORCE +%.o %.s: %.S tools_fixdep FORCE $(Q)$(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 -%/: FORCE +%/: tools_fixdep FORCE $(Q)$(MAKE) $(build)=3D$* need-builtin=3D1 =20 .PHONY: cloc cloc: - find . -name tools -prune -o -name '*.o.d' -print | while read f; do \ + find . -name tools -prune -o -name '*.o.cmd' -print | while read f; do \ for sf in $$(grep -o "[a-zA-Z0-9_/-]*\.[cS]" $$f); do \ test -f "$$sf" && echo "$$sf"; \ done; \ diff --git a/xen/Rules.mk b/xen/Rules.mk index 32a97e012060..4624739ca7e2 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -147,8 +147,8 @@ cpp_flags =3D $(filter-out -Wa$(comma)% -flto,$(1)) # Calculation of flags, first the generic flags, then the arch specific fl= ags, # and last the flags modified for a target or a directory. =20 -c_flags =3D -MMD -MP -MF $(@D)/.$(@F).d $(XEN_CFLAGS) -a_flags =3D -MMD -MP -MF $(@D)/.$(@F).d $(XEN_AFLAGS) +c_flags =3D -MMD -MP -MF $(depfile) $(XEN_CFLAGS) +a_flags =3D -MMD -MP -MF $(depfile) $(XEN_AFLAGS) =20 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk =20 @@ -205,7 +205,7 @@ else endif =20 define rule_cc_o_c - $(call cmd_and_record,cc_o_c) + $(call cmd_and_fixdep,cc_o_c) $(call cmd,objcopy_fix_sym) endef =20 @@ -216,7 +216,7 @@ quiet_cmd_cc_o_S =3D CC $@ cmd_cc_o_S =3D $(CC) $(a_flags) -c $< -o $@ =20 $(obj)/%.o: $(src)/%.S FORCE - $(call if_changed,cc_o_S) + $(call if_changed_dep,cc_o_S) =20 =20 quiet_cmd_obj_init_o =3D INIT_O $@ @@ -246,13 +246,13 @@ quiet_cmd_cpp_s_S =3D CPP $@ cmd_cpp_s_S =3D $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< =20 $(obj)/%.i: $(src)/%.c FORCE - $(call if_changed,cpp_i_c) + $(call if_changed_dep,cpp_i_c) =20 $(obj)/%.s: $(src)/%.c FORCE - $(call if_changed,cc_s_c) + $(call if_changed_dep,cc_s_c) =20 $(obj)/%.s: $(src)/%.S FORCE - $(call if_changed,cpp_s_S) + $(call if_changed_dep,cpp_s_S) =20 # Linker scripts, .lds.S -> .lds quiet_cmd_cpp_lds_S =3D LDS $@ @@ -291,9 +291,6 @@ existing-targets :=3D $(wildcard $(sort $(targets))) =20 -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) =20 -DEPS :=3D $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).d) --include $(DEPS_INCLUDE) - # Declare the contents of the PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends. .PHONY: $(PHONY) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 6f18daf9105c..456b7eed7536 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -245,7 +245,7 @@ $(BASEDIR)/arch/x86/include/asm/asm-macros.h: $(obj)/as= m-macros.i $(src)/Makefil =20 $(obj)/efi.lds: AFLAGS-y +=3D -DEFI $(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE - $(call if_changed,cpp_lds_S) + $(call if_changed_dep,cpp_lds_S) =20 $(obj)/boot/mkelf32: $(src)/boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< @@ -261,9 +261,3 @@ clean:: rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi efi/mkreloc rm -f boot/cmdline.S boot/reloc.S boot/*.lnk boot/*.bin rm -f note.o - -# Suppress loading of DEPS files for internal, temporary target files. Th= is -# then also suppresses re-generation of the respective .*.d2 files. -ifeq ($(filter-out .xen%.o,$(notdir $(MAKECMDGOALS))),) -DEPS_INCLUDE:=3D -endif diff --git a/xen/build.mk b/xen/build.mk index bf0c9710241a..c471312f98a3 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -39,6 +39,7 @@ include/xen/compile.h: include/xen/compile.h.in .banner F= ORCE =20 targets +=3D include/xen/compile.h =20 +-include $(wildcard .asm-offsets.s.d) asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.c $(CC) $(call cpp_flags,$(c_flags)) -S -g0 -o $@.new -MQ $@ $< $(call move-if-changed,$@.new,$@) diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index a333c3961db6..6be38301e835 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -15,8 +15,7 @@ dot-target =3D $(@D)/.$(@F) =20 ### # dependencies -DEPS =3D .*.d -DEPS_INCLUDE =3D $(addsuffix .d2, $(basename $(wildcard $(DEPS)))) +depfile =3D $(dot-target).d =20 ### # real prerequisites without phony targets @@ -83,6 +82,8 @@ cmd =3D @set -e; $(echo-cmd) $(cmd_$(1)) ### # if_changed - execute command if any prerequisite is newer than # target, or command line has changed +# if_changed_dep - as if_changed, but uses fixdep to reveal dependencies +# including used config symbols # if_changed_rule - as if_changed but execute rule instead =20 ifneq ($(KBUILD_NOCMDDEP),1) @@ -111,15 +112,19 @@ if_changed =3D $(if $(any-prereq)$(cmd-check), = \ $(cmd); = \ printf '%s\n' 'cmd_$@ :=3D $(make-cmd)' > $(dot-target).cmd, @:) =20 +# Execute the command and also postprocess generated .d dependencies file. +if_changed_dep =3D $(if $(any-prereq)$(cmd-check),$(cmd_and_fixdep),@:) + +cmd_and_fixdep =3D = \ + $(cmd); = \ + tools/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd; = \ + rm -f $(depfile) + # Usage: $(call if_changed_rule,foo) # Will check if $(cmd_foo) or any of the prerequisites changed, # and if so will execute $(rule_foo). if_changed_rule =3D $(if $(any-prereq)$(cmd-check),$(rule_$(1)),@:) =20 -cmd_and_record =3D = \ - $(cmd); = \ - printf '%s\n' 'cmd_$@ :=3D $(make-cmd)' > $(dot-target).cmd - ### # why - tell why a target got built # enabled by make V=3D2 diff --git a/xen/tools/Makefile b/xen/tools/Makefile index 4e42163f981c..722f3664549d 100644 --- a/xen/tools/Makefile +++ b/xen/tools/Makefile @@ -2,11 +2,14 @@ include $(XEN_ROOT)/Config.mk =20 .PHONY: default -default: symbols +default: symbols fixdep =20 .PHONY: clean clean: - rm -f *.o symbols + rm -f *.o symbols fixdep =20 symbols: symbols.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< + +fixdep: fixdep.c + $(HOSTCC) $(HOSTCFLAGS) -o $@ $< diff --git a/xen/tools/fixdep.c b/xen/tools/fixdep.c new file mode 100644 index 000000000000..d98540552941 --- /dev/null +++ b/xen/tools/fixdep.c @@ -0,0 +1,404 @@ +/* + * "Optimize" a list of dependencies as spit out by gcc -MD + * for the kernel build + * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D + * + * Author Kai Germaschewski + * Copyright 2002 by Kai Germaschewski + * + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. + * + * + * Introduction: + * + * gcc produces a very nice and correct list of dependencies which + * tells make when to remake a file. + * + * To use this list as-is however has the drawback that virtually + * every file in the kernel includes autoconf.h. + * + * If the user re-runs make *config, autoconf.h will be + * regenerated. make notices that and will rebuild every file which + * includes autoconf.h, i.e. basically all files. This is extremely + * annoying if the user just changed CONFIG_HIS_DRIVER from n to m. + * + * So we play the same trick that "mkdep" played before. We replace + * the dependency on autoconf.h by a dependency on every config + * option which is mentioned in any of the listed prerequisites. + * + * kconfig populates a tree in include/config/ with an empty file + * for each config symbol and when the configuration is updated + * the files representing changed config options are touched + * which then let make pick up the changes and the files that use + * the config symbols are rebuilt. + * + * So if the user changes his CONFIG_HIS_DRIVER option, only the objects + * which depend on "include/config/his/driver.h" will be rebuilt, + * so most likely only his driver ;-) + * + * The idea above dates, by the way, back to Michael E Chastain, AFAIK. + * + * So to get dependencies right, there are two issues: + * o if any of the files the compiler read changed, we need to rebuild + * o if the command line given to the compile the file changed, we + * better rebuild as well. + * + * The former is handled by using the -MD output, the later by saving + * the command line used to compile the old object and comparing it + * to the one we would now use. + * + * Again, also this idea is pretty old and has been discussed on + * kbuild-devel a long time ago. I don't have a sensibly working + * internet connection right now, so I rather don't mention names + * without double checking. + * + * This code here has been based partially based on mkdep.c, which + * says the following about its history: + * + * Copyright abandoned, Michael Chastain, . + * This is a C version of syncdep.pl by Werner Almesberger. + * + * + * It is invoked as + * + * fixdep + * + * and will read the dependency file + * + * The transformed dependency snipped is written to stdout. + * + * It first generates a line + * + * cmd_ =3D + * + * and then basically copies the ..d file to stdout, in the + * process filtering out the dependency on autoconf.h and adding + * dependencies on include/config/my/option.h for every + * CONFIG_MY_OPTION encountered in any of the prerequisites. + * + * We don't even try to really parse the header files, but + * merely grep, i.e. if CONFIG_FOO is mentioned in a comment, it will + * be picked up as well. It's not a problem with respect to + * correctness, since that can only give too many dependencies, thus + * we cannot miss a rebuild. Since people tend to not mention totally + * unrelated CONFIG_ options all over the place, it's not an + * efficiency problem either. + * + * (Note: it'd be easy to port over the complete mkdep state machine, + * but I don't think the added complexity is worth it) + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void usage(void) +{ + fprintf(stderr, "Usage: fixdep \n"); + exit(1); +} + +/* + * In the intended usage of this program, the stdout is redirected to .*.c= md + * files. The return value of printf() and putchar() must be checked to ca= tch + * any error, e.g. "No space left on device". + */ +static void xprintf(const char *format, ...) +{ + va_list ap; + int ret; + + va_start(ap, format); + ret =3D vprintf(format, ap); + if (ret < 0) { + perror("fixdep"); + exit(1); + } + va_end(ap); +} + +static void xputchar(int c) +{ + int ret; + + ret =3D putchar(c); + if (ret =3D=3D EOF) { + perror("fixdep"); + exit(1); + } +} + +/* + * Print out a dependency path from a symbol name + */ +static void print_dep(const char *m, int slen, const char *dir) +{ + int c, prev_c =3D '/', i; + + xprintf(" $(wildcard %s/", dir); + for (i =3D 0; i < slen; i++) { + c =3D m[i]; + if (c =3D=3D '_') + c =3D '/'; + else + c =3D tolower(c); + if (c !=3D '/' || prev_c !=3D '/') + xputchar(c); + prev_c =3D c; + } + xprintf(".h) \\\n"); +} + +struct item { + struct item *next; + unsigned int len; + unsigned int hash; + char name[]; +}; + +#define HASHSZ 256 +static struct item *hashtab[HASHSZ]; + +static unsigned int strhash(const char *str, unsigned int sz) +{ + /* fnv32 hash */ + unsigned int i, hash =3D 2166136261U; + + for (i =3D 0; i < sz; i++) + hash =3D (hash ^ str[i]) * 0x01000193; + return hash; +} + +/* + * Lookup a value in the configuration string. + */ +static int is_defined_config(const char *name, int len, unsigned int hash) +{ + struct item *aux; + + for (aux =3D hashtab[hash % HASHSZ]; aux; aux =3D aux->next) { + if (aux->hash =3D=3D hash && aux->len =3D=3D len && + memcmp(aux->name, name, len) =3D=3D 0) + return 1; + } + return 0; +} + +/* + * Add a new value to the configuration string. + */ +static void define_config(const char *name, int len, unsigned int hash) +{ + struct item *aux =3D malloc(sizeof(*aux) + len); + + if (!aux) { + perror("fixdep:malloc"); + exit(1); + } + memcpy(aux->name, name, len); + aux->len =3D len; + aux->hash =3D hash; + aux->next =3D hashtab[hash % HASHSZ]; + hashtab[hash % HASHSZ] =3D aux; +} + +/* + * Record the use of a CONFIG_* word. + */ +static void use_config(const char *m, int slen) +{ + unsigned int hash =3D strhash(m, slen); + + if (is_defined_config(m, slen, hash)) + return; + + define_config(m, slen, hash); + print_dep(m, slen, "include/config"); +} + +/* test if s ends in sub */ +static int str_ends_with(const char *s, int slen, const char *sub) +{ + int sublen =3D strlen(sub); + + if (sublen > slen) + return 0; + + return !memcmp(s + slen - sublen, sub, sublen); +} + +static void parse_config_file(const char *p) +{ + const char *q, *r; + const char *start =3D p; + + while ((p =3D strstr(p, "CONFIG_"))) { + if (p > start && (isalnum(p[-1]) || p[-1] =3D=3D '_')) { + p +=3D 7; + continue; + } + p +=3D 7; + q =3D p; + while (isalnum(*q) || *q =3D=3D '_') + q++; + if (str_ends_with(p, q - p, "_MODULE")) + r =3D q - 7; + else + r =3D q; + if (r > p) + use_config(p, r - p); + p =3D q; + } +} + +static void *read_file(const char *filename) +{ + struct stat st; + int fd; + char *buf; + + fd =3D open(filename, O_RDONLY); + if (fd < 0) { + fprintf(stderr, "fixdep: error opening file: "); + perror(filename); + exit(2); + } + if (fstat(fd, &st) < 0) { + fprintf(stderr, "fixdep: error fstat'ing file: "); + perror(filename); + exit(2); + } + buf =3D malloc(st.st_size + 1); + if (!buf) { + perror("fixdep: malloc"); + exit(2); + } + if (read(fd, buf, st.st_size) !=3D st.st_size) { + perror("fixdep: read"); + exit(2); + } + buf[st.st_size] =3D '\0'; + close(fd); + + return buf; +} + +/* Ignore certain dependencies */ +static int is_ignored_file(const char *s, int len) +{ + return str_ends_with(s, len, "include/generated/autoconf.h") || + str_ends_with(s, len, "include/generated/autoksyms.h"); +} + +/* + * Important: The below generated source_foo.o and deps_foo.o variable + * assignments are parsed not only by make, but also by the rather simple + * parser in scripts/mod/sumversion.c. + */ +static void parse_dep_file(char *m, const char *target) +{ + char *p; + int is_last, is_target; + int saw_any_target =3D 0; + int is_first_dep =3D 0; + void *buf; + + while (1) { + /* Skip any "white space" */ + while (*m =3D=3D ' ' || *m =3D=3D '\\' || *m =3D=3D '\n') + m++; + + if (!*m) + break; + + /* Find next "white space" */ + p =3D m; + while (*p && *p !=3D ' ' && *p !=3D '\\' && *p !=3D '\n') + p++; + is_last =3D (*p =3D=3D '\0'); + /* Is the token we found a target name? */ + is_target =3D (*(p-1) =3D=3D ':'); + /* Don't write any target names into the dependency file */ + if (is_target) { + /* The /next/ file is the first dependency */ + is_first_dep =3D 1; + } else if (!is_ignored_file(m, p - m)) { + *p =3D '\0'; + + /* + * Do not list the source file as dependency, so that + * kbuild is not confused if a .c file is rewritten + * into .S or vice versa. Storing it in source_* is + * needed for modpost to compute srcversions. + */ + if (is_first_dep) { + /* + * If processing the concatenation of multiple + * dependency files, only process the first + * target name, which will be the original + * source name, and ignore any other target + * names, which will be intermediate temporary + * files. + */ + if (!saw_any_target) { + saw_any_target =3D 1; + xprintf("source_%s :=3D %s\n\n", + target, m); + xprintf("deps_%s :=3D \\\n", target); + } + is_first_dep =3D 0; + } else { + xprintf(" %s \\\n", m); + } + + buf =3D read_file(m); + parse_config_file(buf); + free(buf); + } + + if (is_last) + break; + + /* + * Start searching for next token immediately after the first + * "whitespace" character that follows this token. + */ + m =3D p + 1; + } + + if (!saw_any_target) { + fprintf(stderr, "fixdep: parse error; no targets found\n"); + exit(1); + } + + xprintf("\n%s: $(deps_%s)\n\n", target, target); + xprintf("$(deps_%s):\n", target); +} + +int main(int argc, char *argv[]) +{ + const char *depfile, *target, *cmdline; + void *buf; + + if (argc !=3D 4) + usage(); + + depfile =3D argv[1]; + target =3D argv[2]; + cmdline =3D argv[3]; + + xprintf("cmd_%s :=3D %s\n\n", target, cmdline); + + buf =3D read_file(depfile); + parse_dep_file(buf, target); + free(buf); + + return 0; +} --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848078; cv=none; d=zohomail.com; s=zohoarc; b=bY0DcjfVWrbb3sqaB9f6re2a/yRDu+uuNtJhyCqc9E9h2984+Y+czUFEoyD2+TnvnldOYVzIycSr0Y+mwGORgLBvhxD82qqNuINT3MXXXeyi8FCnuTRm/Gdw1Mq+GPzprz2sm3kl870EtR8S3se+qVt5HdNrSc5BcBW2JbXqefI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848078; 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=5Zl7T+twCuag5brtFG+etxTkZzmHLCIk8A8yHhpR2Rg=; b=EENj4lDb03A10zCnxtwiXw6+nctMbOtdTs7CiYlX3SZOZ3zgTRpDnx3/aBAIVCVXrl7NT3FTTsjEZwa0qkaR9F/yrdLFZeRfMwR5JSVzz4oA4WfMHYyYcgszB7rDgRdyNLPkLG3vnb35hWycQQl/qaoBK9f8ncObLKkokZPmvwg= 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 1637848078952803.9012556946208; Thu, 25 Nov 2021 05:47:58 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231300.400290 (Exim 4.92) (envelope-from ) id 1mqF6G-0006uy-83; Thu, 25 Nov 2021 13:47:44 +0000 Received: by outflank-mailman (output) from mailman id 231300.400290; Thu, 25 Nov 2021 13:47:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6F-0006q0-G3; Thu, 25 Nov 2021 13:47:43 +0000 Received: by outflank-mailman (input) for mailman id 231300; Thu, 25 Nov 2021 13:47:42 +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 1mqEzm-0007NX-79 for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:02 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 529b438c-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:00 +0100 (CET) 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: 529b438c-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847660; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/8ecL57WQSeBuZo2P6i4snr54bttWa1idLLgaIXs6qQ=; b=Ov0TSVUwNcRF2199NxJN2DG9PyIUXQ4TIx8lTZYTKpkxbE/5/spYMrLV VO0X+hAs1QBj445S12pq/lq+46hc9/vie6EM2P0hT2GJy8Q4MYrP3cNGH G7gVX9ltf857lhsDsg3rep+N5dxfPzfDLWKUsJQx8zY9XItdK59s88v8A Y=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: iLs3vK6REGTPu6tzZUIOuOGnPY4tebgAJQYOOvmQr0GB7D+r5FwkQRIN8rmHfMVdwOE8ATTsZc /kRna3F51RqchvMgtQRzWT6ihD+fohnqNQC3PnFhT4FZCObwHMaFrmnQC2ZmgjT6SuBxC3hxIs ukiqItUc6B+eT8xjYlHmHzmH/dmsH9udIG/C+P90Yol9KU3eBp5fFBIy7LZaOjvIfvBwnfyWv9 BfmjUTfpZ34KF5sV3e58iqmm9tC0Rd6WQcsui3nE8QgZtjRpJfyDLJbkF2c3UrSwEQVaQNPCza 0UrB+3x2M/1jznwz06HKA1k8 X-SBRS: 5.1 X-MesageID: 58617651 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:MnrkOKtulovxx7cZK7+xNomjSefnVP1ZMUV32f8akzHdYApBsoF/q tZmKTqDPqmIMDH0fIgjbIS2pEkB7MWDy4AxTwQ4rXtnHn4R+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZQP0VOZigHtIQMsadUsxKbVIiGHhJZS5LwbZj29cx24XhWWthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ NplnrXvRzcYDL31osMbYjN5PCBnZvF+9+qSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DNYUDunZm3HfBAOwvW5zrSKTW/95Imjw3g6iiGN6DN 5RANmQyNXwsZTVfOHUuVLw1vN23jz7ASW1hi0y2no4etj27IAtZj+G2bYu9lsaxbdpRtlaVo CTB5WuRKgoBKNWVxD6B83StruzChyX2XMQVDrLQ3vRnmkGJz2ofThgfT0KmoOKRg1S7HdlYL iQ8xC0qqqQj8V2xefP0VRa4vX2sswYVXpxbFOhSwAOHx7fQ4g2ZLnMZVTMHY9sj3OcmSDpv2 lKXktfBAT10rKbTWX+b7q2Trz65JW4SN2BqTS0ZSQoI5fHzrYd1iQjAJv5iD6ydntDzASv3w T2BsG45nbp7sCIQ//zlpxad2Wvq/8WXCF5ujunKYo67xihQO4CVVr640GL868dqDamYVwLdh HdRzqBy89syJZ2KkSWMRsAEE7eo++uJPVXgvLJ/I3Uy32/zoiD+JOi89Bk7fR40aZhcJVcFd WeK4VsJjKK/KkdGekOej2iZL80xhZbtGt3+Phw/RoofO8MhHONrEcwHWKJx44wPuBRz+U3cE c3CGSpJMZr9If46pAdav89HjdcWKtkWnAs/v6zTwRW9yqa5b3WIU7oDO1bmRrlnt/zb/1SFo 4cFaZriJ/BjvArWOHe/zGLuBQpScShT6W7e96S7idJv0iI5QTp8Wpc9MJsqepB/nrQ9qws71 irVZ6Os83Km3SevAVzTMhhLMeqzNb4i/SNTFXF9Zj6Ahil8CbtDGY9CLvPbi5F8r7c9pRO1J tFYE/i97gNnFm6apm9DNMal9+SPtn2D3GqzAsZsWxBnF7YIeuAD0oWMktLH+HZcAyypm9E5p rH8hArXTYBaH1ZpDdrMaeLpxFS05CBPlOV3VkrOA99SZESzr9Q6d32v1qc6c5MWNBHO5jqGz ALKUx0WkvbA/t0u+97TiKHa84rwS7liHlBXFnXw5KqtMXWI5XKqxIJNCb7afT3UWG7u1r+lY OFZk6P1PPEdxQ4YuItgCbd7i6k54oK39bNdyw1lGlTNbkiqVew8ciXXg5EXu/QUlLFDuAawV kaewfVgOO2EaJH/DVocBAs5deDfh/sarSbfsKYuK0Lg6S4poLfeCRdOPwOBgTB2JaduNN932 v8ovcMb5lDtihcuNdra3ClY+37Vcy4FWqQj8JobHJXqmkwgzVQbOc7QDSr/4ZeubdRQMxZ1f m/I1fSa37kMlFDfd3cTFGTW2bsPjJsDjxlG0VseKgnbgdHCnPI2gEVc/Dlfot65FfmbPzaf4 lRWCnA= IronPort-HdrOrdr: A9a23:Km9AVqGjTHFjroD2pLqE7seALOsnbusQ8zAXP0AYc3Nom6uj5q eTdZUgpGbJYVkqOU3I9ersBEDEewK/yXcX2/h0AV7BZmnbUQKTRekIh7cKgQeQfhEWntQts5 uIGJIRNDSfNzRHZL7BkWqFL+o= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58617651" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , "Bertrand Marquis" Subject: [XEN PATCH v8 14/47] build: rename __LINKER__ to LINKER_SCRIPT Date: Thu, 25 Nov 2021 13:39:33 +0000 Message-ID: <20211125134006.1076646-15-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848081173100005 Content-Type: text/plain; charset="utf-8" For two reasons: this macro is used to generate a "linker script" and is not by the linker, and name starting with an underscore '_' are supposed to be reserved, so better avoid them when not needed. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich Acked-by: Julien Grall --- xen/Rules.mk | 2 +- xen/arch/arm/include/asm/config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 4624739ca7e2..d32fec0ae037 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -256,7 +256,7 @@ $(obj)/%.s: $(src)/%.S FORCE =20 # Linker scripts, .lds.S -> .lds quiet_cmd_cpp_lds_S =3D LDS $@ -cmd_cpp_lds_S =3D $(CPP) -P $(call cpp_flags,$(a_flags)) -D__LINKER__ -MQ = $@ -o $@ $< +cmd_cpp_lds_S =3D $(CPP) -P $(call cpp_flags,$(a_flags)) -DLINKER_SCRIPT -= MQ $@ -o $@ $< =20 targets :=3D $(filter-out $(PHONY), $(targets)) =20 diff --git a/xen/arch/arm/include/asm/config.h b/xen/arch/arm/include/asm/c= onfig.h index c7b77912013e..2aced0bc3b8b 100644 --- a/xen/arch/arm/include/asm/config.h +++ b/xen/arch/arm/include/asm/config.h @@ -191,7 +191,7 @@ extern unsigned long frametable_virt_end; #define watchdog_disable() ((void)0) #define watchdog_enable() ((void)0) =20 -#if defined(__ASSEMBLY__) && !defined(__LINKER__) +#if defined(__ASSEMBLY__) && !defined(LINKER_SCRIPT) #include #include #endif --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848096; cv=none; d=zohomail.com; s=zohoarc; b=GDdIC8fdow/0KvbZ/t6LkP/0mgrvvm6i6oO6NZvOSKf9b4Guf6JxYMM3FwO7HiLqniFCaqH+vZSeqA433MaARo6pYIvNLe1hBVjo/J25MJZ9hUgIxEkgv1SP9tMJPjjosP88qO9mTiITPq77ZaGbAL87wyEvE5f79C71c2f9/hE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848096; 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=gWddqfZDrfOICV8kjmFyqVxHzZSrGqKhGAGKpFrLxk4=; b=LkLU9zGtEAjA3Yu1z/jwPBI2IUQn1wHVo+hrpy6Roi+/xtVIZDO8DWKV2melEOlge9c9EIkBYGjNCeT7oyYcJOjh8K4AgGyTs5JgBwCiWtkGrkV2EsgqtspBPQv3dMjbSwlTmtW6qgwThyC1DSvlApnN8xwoz9k+AkG5osrHr4Q= 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 1637848096303494.10136870479084; Thu, 25 Nov 2021 05:48:16 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231311.400344 (Exim 4.92) (envelope-from ) id 1mqF6S-0001Rx-L7; Thu, 25 Nov 2021 13:47:56 +0000 Received: by outflank-mailman (output) from mailman id 231311.400344; Thu, 25 Nov 2021 13:47:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6S-0001Oc-2o; Thu, 25 Nov 2021 13:47:56 +0000 Received: by outflank-mailman (input) for mailman id 231311; Thu, 25 Nov 2021 13:47:52 +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 1mqEzp-0007NX-7d for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:05 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 53c40e20-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:02 +0100 (CET) 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: 53c40e20-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847662; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RXcp/FFcN5mYkoMn+8MsGpkECzNRJcUwjpBXUKglChM=; b=O7Q+8WaToGC+ZOHqHw+U2c1lNXHmRt6ZNm5SeSFAo8HyB1/o6C+xSKEg 5kHUiWN6ub1pl09Wqpb1gOSZHJQ6r7bz28/snmHbLluzX0PGhjShz6qZT NhIfPOIf4lH8dkp4SKL6hIkHu5AAWl4h3+wmlrnni/s3giJAR0iLLu3bQ Y=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: F7hIUb88nLqpZhH7E9pCB6Umz3lhqqQrrBS7bZ6sIFHr3GaKXeW+bIMgmHsu50sPL8awl/Ednx Gy9Vk9VlTDCrsosmRVU+lEXvWPspzFW4pdeQrlBsdcSLB3lqQmQvPg2lZNXgJksYnuztOZY53H hGvBAnyu/5sxsgbrXCA8DYsBn+SZJOfqYhkxCwsSyl7JG/hljkO1qbV74JmtGyOlyU0RsqxtX1 7mxKBjDJBISIu7hqAVwOLkCuIYYsm1pp0fQiLP9u4jxoV0rMad0ShpDm6oa/HC5gpPJjvApMoe f/N34FOgpblsX9JFgpvOa2Ok X-SBRS: 5.1 X-MesageID: 58637842 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:d0H3WaoZjSP7dXIpEZErTehnHo1eBmKJYhIvgKrLsJaIsI4StFCzt garIBmHPf2OYmD8eoxwbNmwoE1Su8OBmoUwSAY6ryo1FStHopuZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlZT4vE2xbuKU5NTsY0idfic5Dnd+4f5fs7Rh2Ncx2ILkW1nlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCnbWVdD9uIbPLo+02aj98PQZDB6xAwbCSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex6RCXvFIoZpnFnyyCfFfs8SIrPa67L+cVZzHE7gcUm8fP2O ppHMmU/ME6ojxtnBVUtK4x5ms6SmUK4KzNZmFSznbs6/D2GpOB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5GUNO61FJzxwEQe4HYBw/3/IqLOodFPUQdK zOJgLbP2uZHzU3YfntvTXXA0IKxX3jVVMymGLPaG2m0pw== IronPort-HdrOrdr: A9a23:1+5PE6wC1+W0qN5WwSUqKrPxqeskLtp133Aq2lEZdPULSL37qy n+poV56farslYssSkb6K690Wy7MAHhHO1OkPgs1NaZMjUO11HYVr2KgbGSpAEIXheOidK1tp 0QPJSWaueAcGSS5PySiGLTfLdQpajizE2xv4vjJjVWPH1XgslbnkRE422gYzRLrXx9dOEE/e 2nl7J6TlSbCBIqR/X+LH8JU9XcoZnumIj9aRALJzNP0njOsRqYrJT9HhSkwBEmSDVEza05/W WtqX242kyWiYD49vaQ7R6K03yY8OGRhudrNYipsIw4Oz/sggGnaMBIXKCDhik8pKWV5FMjgL D30lwd15AY0R7sV1DwhSGo9xjr0T4o5XOn40Sfm2HfrcvwQy9/I9ZdhKpCGyGpunYIjZVZ6u ZmzmiZv51YAVfrhyLm/eXFUBlsiw6dvWciq+gOlHZSOLFuNoO5lbZvrH+9La1wQB4SqbpXTd WGNfusvsq+pGnqMEwwvQFUsZSRtzoIb1n2EXTrfKSuon1rdTtCvjslLfck7wM9HEhUcegB2w 2NCNUaqFhvdL5RUUsvPpZZfSNAYla9DC4lDgqpUCLa/FZuAQOGl3ew2sRv2Mirf5MP0Zc5md DAXTpjxCkPknPVeISzNcdwg2XwqU2GLEPQ9v0= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58637842" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , Doug Goldstein Subject: [XEN PATCH v8 15/47] build: hook kconfig into xen build system Date: Thu, 25 Nov 2021 13:39:34 +0000 Message-ID: <20211125134006.1076646-16-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848097707100001 Content-Type: text/plain; charset="utf-8" Now that xen's build system is very close to Linux's ones, we can hook "Makefile.host" into Xen's build system, and we can build Kconfig with that. "tools/kconfig/Makefile" now needs a workaround to not rebuild "$(XEN_ROOT)/.config", as `make` tries the rules "%.config" which fails with: tools/kconfig/Makefile:95: *** No configuration exists for this target = on this architecture. Stop. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v8: - reviewed - adjust Makefile.host to use the renamed macro "multi-depend". - move .config empty rules workaround into kconfig/Makefile (from Rules= .mk) and merge the change of patch build: add an other explicite rules to not build $(XEN_ROOT)/.c= onfig into build: hook kconfig into xen build system xen/Makefile | 34 ++++-- xen/Rules.mk | 13 ++- xen/scripts/Kbuild.include | 31 ++++++ xen/scripts/Makefile.clean | 11 +- xen/{tools/kconfig =3D> scripts}/Makefile.host | 11 +- xen/tools/kconfig/Makefile | 3 + xen/tools/kconfig/Makefile.kconfig | 106 ------------------- 7 files changed, 86 insertions(+), 123 deletions(-) rename xen/{tools/kconfig =3D> scripts}/Makefile.host (95%) delete mode 100644 xen/tools/kconfig/Makefile.kconfig diff --git a/xen/Makefile b/xen/Makefile index d38425234c6c..c26c44818916 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -40,6 +40,7 @@ ARCH=3D$(XEN_TARGET_ARCH) SRCARCH=3D$(shell echo $(ARCH) | \ sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g' \ -e s'/riscv.*/riscv/g') +export ARCH SRCARCH =20 # Don't break if the build process wasn't called from the top level # we need XEN_TARGET_ARCH to generate the proper config @@ -163,6 +164,13 @@ ifneq ($(filter %config,$(MAKECMDGOALS)),) config-build :=3D y endif =20 +export CONFIG_SHELL :=3D $(SHELL) +export YACC =3D $(if $(BISON),$(BISON),bison) +export LEX =3D $(if $(FLEX),$(FLEX),flex) + +# Default file for 'make defconfig'. +export KBUILD_DEFCONFIG :=3D $(ARCH)_defconfig + # CLANG_FLAGS needs to be calculated before calling Kconfig ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) CLANG_FLAGS :=3D @@ -203,9 +211,6 @@ PHONY +=3D tools_fixdep tools_fixdep: $(MAKE) -C tools fixdep =20 -# Shorthand for kconfig -kconfig =3D -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SR= CARCH=3D$(SRCARCH) HOSTCC=3D"$(HOSTCC)" HOSTCXX=3D"$(HOSTCXX)" - ifeq ($(config-build),y) # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D # *config targets only - make sure prerequisites are updated, and descend @@ -221,14 +226,14 @@ filechk_kconfig_allconfig =3D \ .allconfig.tmp: FORCE set -e; { $(call filechk_kconfig_allconfig); } > $@ =20 -config: FORCE - $(MAKE) $(kconfig) $@ +config: tools_fixdep FORCE + $(Q)$(MAKE) $(build)=3Dtools/kconfig $@ =20 # Config.mk tries to include .config file, don't try to remake it %/.config: ; =20 -%config: .allconfig.tmp FORCE - $(MAKE) $(kconfig) KCONFIG_ALLCONFIG=3D$< $@ +%config: .allconfig.tmp tools_fixdep FORCE + $(Q)$(MAKE) $(build)=3Dtools/kconfig KCONFIG_ALLCONFIG=3D$< $@ =20 else # !config-build =20 @@ -238,9 +243,15 @@ ifeq ($(need-config),y) # changes are detected. -include include/config/auto.conf.cmd =20 +# This allows make to build fixdep before invoking defconfig. We can't use +# "tools_fixdep" which is a .PHONY target and would force make to call +# "defconfig" again to update $(KCONFIG_CONFIG). +tools/fixdep: + $(MAKE) -C tools fixdep + # Allow people to just run `make` as before and not force them to configure -$(KCONFIG_CONFIG): - $(MAKE) $(kconfig) defconfig +$(KCONFIG_CONFIG): tools/fixdep + $(Q)$(MAKE) $(build)=3Dtools/kconfig defconfig =20 # The actual configuration files used during the build are stored in # include/generated/ and include/config/. Update them if .config is newer = than @@ -249,7 +260,7 @@ $(KCONFIG_CONFIG): # This exploits the 'multi-target pattern rule' trick. # The syncconfig should be executed only once to make all the targets. include/config/%.conf include/config/%.conf.cmd: $(KCONFIG_CONFIG) - $(MAKE) $(kconfig) syncconfig + $(Q)$(MAKE) $(build)=3Dtools/kconfig syncconfig =20 ifeq ($(CONFIG_DEBUG),y) CFLAGS +=3D -O1 @@ -409,9 +420,10 @@ _clean: $(MAKE) $(clean) arch/riscv $(MAKE) $(clean) arch/x86 $(MAKE) $(clean) test - $(MAKE) $(kconfig) clean + $(MAKE) $(clean) tools/kconfig find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \ -o -name ".*.o.tmp" -o -name "*~" -o -name "core" \ + -o -name '*.lex.c' -o -name '*.tab.[ch]' \ -o -name "*.gcno" -o -name ".*.cmd" -o -name "lib.a" \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map *~ core rm -f asm-offsets.s arch/*/include/asm/asm-offsets.h diff --git a/xen/Rules.mk b/xen/Rules.mk index d32fec0ae037..f452a821cc86 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -89,6 +89,13 @@ subdir-y :=3D $(addprefix $(obj)/,$(subdir-y)) nocov-y :=3D $(addprefix $(obj)/,$(nocov-y)) noubsan-y :=3D $(addprefix $(obj)/,$(noubsan-y)) =20 +# Do not include hostprogs rules unless needed. +# $(sort ...) is used here to remove duplicated words and excessive spaces. +hostprogs-y :=3D $(sort $(hostprogs-y)) +ifneq ($(hostprogs-y),) +include scripts/Makefile.host +endif + # subdir-builtin may contain duplications. Use $(sort ...) subdir-builtin :=3D $(sort $(filter %/built_in.o, $(obj-y))) =20 @@ -267,7 +274,11 @@ intermediate_targets =3D $(foreach sfx, $(2), \ $(patsubst %$(strip $(1)),%$(sfx), \ $(filter %$(strip $(1)), $(targets)))) # %.init.o <- %.o -targets +=3D $(call intermediate_targets, .init.o, .o) +# %.lex.o <- %.lex.c <- %.l +# %.tab.o <- %.tab.[ch] <- %.y +targets +=3D $(call intermediate_targets, .init.o, .o) \ + $(call intermediate_targets, .lex.o, .lex.c) \ + $(call intermediate_targets, .tab.o, .tab.c .tab.h) =20 # Build # ------------------------------------------------------------------------= --- diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 6be38301e835..79b42e1252d6 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -25,6 +25,37 @@ real-prereqs =3D $(filter-out $(PHONY), $^) # Escape single quote for use in echo statements escsq =3D $(subst $(squote),'\$(squote)',$1) =20 +### +# Easy method for doing a status message + kecho :=3D : + quiet_kecho :=3D echo +silent_kecho :=3D : +kecho :=3D $($(quiet)kecho) + +### +# filechk is used to check if the content of a generated file is updated. +# Sample usage: +# +# filechk_sample =3D echo $(KERNELRELEASE) +# version.h: FORCE +# $(call filechk,sample) +# +# The rule defined shall write to stdout the content of the new file. +# The existing file will be compared with the new one. +# - If no file exist it is created +# - If the content differ the new file is used +# - If they are equal no change, and no timestamp update +define filechk + $(Q)set -e; \ + mkdir -p $(dir $@); \ + trap "rm -f $(dot-target).tmp" EXIT; \ + { $(filechk_$(1)); } > $(dot-target).tmp; \ + if [ ! -r $@ ] || ! cmp -s $@ $(dot-target).tmp; then \ + $(kecho) ' UPD $@'; \ + mv -f $(dot-target).tmp $@; \ + fi +endef + # as-insn: Check whether assembler supports an instruction. # Usage: cflags-y +=3D $(call as-insn,CC FLAGS,"insn",option-yes,option-no) as-insn =3D $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \ diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index c3b0681611da..156d6307cf83 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -17,8 +17,17 @@ include $(src)/Makefile subdir-all :=3D $(subdir-y) $(subdir-n) $(subdir-) \ $(patsubst %/,%, $(filter %/, $(obj-y) $(obj-n) $(obj-))) =20 +__clean-files :=3D \ + $(clean-files) $(hostprogs-y) $(hostprogs-) + +__clean-files :=3D $(wildcard $(__clean-files)) + .PHONY: clean -clean:: $(subdir-all) ; +clean:: $(subdir-all) +ifneq ($(strip $(__clean-files)),) + rm -rf $(__clean-files) +endif + @: =20 # Descending # ------------------------------------------------------------------------= --- diff --git a/xen/tools/kconfig/Makefile.host b/xen/scripts/Makefile.host similarity index 95% rename from xen/tools/kconfig/Makefile.host rename to xen/scripts/Makefile.host index 4c51c95d40f4..8a85f94316bc 100644 --- a/xen/tools/kconfig/Makefile.host +++ b/xen/scripts/Makefile.host @@ -1,5 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 =20 +# target with $(obj)/ and its suffix stripped +target-stem =3D $(basename $(patsubst $(obj)/%,%,$@)) + # LEX # ------------------------------------------------------------------------= --- quiet_cmd_flex =3D LEX $@ @@ -114,7 +117,7 @@ quiet_cmd_host-cmulti =3D HOSTLD $@ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) $(host-cmulti): FORCE $(call if_changed,host-cmulti) -$(call multi_depend, $(host-cmulti), , -objs) +$(call multi-depend, $(host-cmulti), , -objs) =20 # Create .o file from a single .c file # host-cobjs -> .o @@ -132,7 +135,7 @@ quiet_cmd_host-cxxmulti =3D HOSTLD $@ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) $(host-cxxmulti): FORCE $(call if_changed,host-cxxmulti) -$(call multi_depend, $(host-cxxmulti), , -objs -cxxobjs) +$(call multi-depend, $(host-cxxmulti), , -objs -cxxobjs) =20 # Create .o file from a single .cc (C++) file quiet_cmd_host-cxxobjs =3D HOSTCXX $@ @@ -165,7 +168,7 @@ quiet_cmd_host-cshlib =3D HOSTLLD -shared $@ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem).so) $(host-cshlib): FORCE $(call if_changed,host-cshlib) -$(call multi_depend, $(host-cshlib), .so, -objs) +$(call multi-depend, $(host-cshlib), .so, -objs) =20 # Link a shared library, based on position independent .o files # *.o -> .so shared library (host-cxxshlib) @@ -175,7 +178,7 @@ quiet_cmd_host-cxxshlib =3D HOSTLLD -shared $@ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem).so) $(host-cxxshlib): FORCE $(call if_changed,host-cxxshlib) -$(call multi_depend, $(host-cxxshlib), .so, -objs) +$(call multi-depend, $(host-cxxshlib), .so, -objs) =20 targets +=3D $(host-csingle) $(host-cmulti) $(host-cobjs)\ $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) $(host= -cxxshlib) $(host-cxxshobjs) diff --git a/xen/tools/kconfig/Makefile b/xen/tools/kconfig/Makefile index f39521a0ed5b..b7b9a419ad59 100644 --- a/xen/tools/kconfig/Makefile +++ b/xen/tools/kconfig/Makefile @@ -91,6 +91,9 @@ endif =20 configfiles=3D$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SR= CARCH)/configs/$@) =20 +# Don't try to remake this file included by Config.mk. +$(XEN_ROOT)/.config: ; + %.config: $(obj)/conf $(if $(call configfiles),, $(error No configuration exists for this targe= t on this architecture)) $(Q)$(CONFIG_SHELL) $(srctree)/tools/kconfig/merge_config.sh -m .config $= (configfiles) diff --git a/xen/tools/kconfig/Makefile.kconfig b/xen/tools/kconfig/Makefil= e.kconfig deleted file mode 100644 index 799321ec4d07..000000000000 --- a/xen/tools/kconfig/Makefile.kconfig +++ /dev/null @@ -1,106 +0,0 @@ -# xen/tools/kconfig - -# default rule to do nothing -all: - -# Xen doesn't have a silent build flag -quiet :=3D -Q :=3D -kecho :=3D : - -# eventually you'll want to do out of tree builds -srctree :=3D $(BASEDIR) -objtree :=3D $(srctree) -src :=3D tools/kconfig -obj :=3D $(src) - -# handle functions (most of these lifted from different Linux makefiles -dot-target =3D $(dir $@).$(notdir $@) -depfile =3D $(subst $(comma),,$(dot-target).d) -basetarget =3D $(basename $(notdir $@)) -# target with $(obj)/ and its suffix stripped -target-stem =3D $(basename $(patsubst $(obj)/%,%,$@)) -cmd =3D $(cmd_$(1)) -if_changed =3D $(cmd_$(1)) -if_changed_dep =3D $(cmd_$(1)) - -### -# filechk is used to check if the content of a generated file is updated. -# Sample usage: -# -# filechk_sample =3D echo $(KERNELRELEASE) -# version.h: FORCE -# $(call filechk,sample) -# -# The rule defined shall write to stdout the content of the new file. -# The existing file will be compared with the new one. -# - If no file exist it is created -# - If the content differ the new file is used -# - If they are equal no change, and no timestamp update -# - stdin is piped in from the first prerequisite ($<) so one has -# to specify a valid file as first prerequisite (often the kbuild file) -define filechk - $(Q)set -e; \ - mkdir -p $(dir $@); \ - { $(filechk_$(1)); } > $@.tmp; \ - if [ -r $@ ] && cmp -s $@ $@.tmp; then \ - rm -f $@.tmp; \ - else \ - $(kecho) ' UPD $@'; \ - mv -f $@.tmp $@; \ - fi -endef - -define multi_depend -$(foreach m, $(notdir $1), \ - $(eval $(obj)/$m: \ - $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=3D%$(s))))))) -endef - -# Set our default defconfig file -KBUILD_DEFCONFIG :=3D $(ARCH)_defconfig - -# provide our shell -CONFIG_SHELL :=3D $(SHELL) - -# provide the host compiler -HOSTCC ?=3D gcc -HOSTCXX ?=3D g++ -YACC =3D $(if $(BISON),$(BISON),bison) -LEX =3D $(if $(FLEX),$(FLEX),flex) - -# force target -PHONY +=3D FORCE - -FORCE: - -# include the original Makefile and Makefile.host from Linux -include $(src)/Makefile -include $(src)/Makefile.host - -# Add intermediate targets: -# When building objects with specific suffix patterns, add intermediate -# targets that the final targets are derived from. -intermediate_targets =3D $(foreach sfx, $(2), \ - $(patsubst %$(strip $(1)),%$(sfx), \ - $(filter %$(strip $(1)), $(targets)))) - -# %.lex.o <- %.lex.c <- %.l -# %.tab.o <- %.tab.[ch] <- %.y -targets +=3D $(call intermediate_targets, .lex.o, .lex.c) \ - $(call intermediate_targets, .tab.o, .tab.c .tab.h) - -# clean up rule -clean-deps =3D $(foreach f,$(host-cobjs) $(host-cxxobjs),$(dir $f).$(notdi= r $f).d) -clean-shipped =3D $(patsubst %_shipped,%,$(wildcard $(obj)/*_shipped)) - -clean: - rm -rf $(clean-files) - rm -rf $(clean-deps) - rm -rf $(host-csingle) $(host-cmulti) $(host-cxxmulti) $(host-cobjs) $(ho= st-cxxobjs) - rm -rf $(clean-shipped) - -$(obj)/zconf%: $(src)/zconf%_shipped - cp -f $< $@ - -.PHONY: $(PHONY) --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848038; cv=none; d=zohomail.com; s=zohoarc; b=BUxR407V+pu/TwXggPU4D/T8+qTww8titPaiQ3c71Cbl+idbzuoqCp1bKFtkl/LV9Q2qpZN0tQ+tjy11+/46N0Y7rBNtyUgMT9j4jdHgqNs7abEvOK1byDFJcTpeAb078xtnpyJWUYrzQdqUqR9nKTZ1qRLZacOodyxLh1c1GDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848038; 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=+RsfJI901jqpUNfctZ6QHgSG0aTkSawZngUXJf2PKKg=; b=Zv9vYhSuBBabCVS0zbEjDEOM3BegctU4O95hFDsm2VtsAmaXzqiptqOa7gQi6qrfILA/lEj1DgqVvS7mEOcHSyqjysIK0prtXoBXm2O6/E+jDmkGlYcbUIanmsKeRdhs0HC+Kjo+Fai0PMvm2RgIkPmBqDd7T3QRXB6kXjBDB9s= 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 1637848038167101.48042129464943; Thu, 25 Nov 2021 05:47:18 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231242.400117 (Exim 4.92) (envelope-from ) id 1mqF5Z-0007HK-MK; Thu, 25 Nov 2021 13:47:01 +0000 Received: by outflank-mailman (output) from mailman id 231242.400117; Thu, 25 Nov 2021 13:47:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5Z-0007Fu-Em; Thu, 25 Nov 2021 13:47:01 +0000 Received: by outflank-mailman (input) for mailman id 231242; Thu, 25 Nov 2021 13:46:59 +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 1mqEzq-00076i-9U for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:06 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 549d3f94-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:02 +0100 (CET) 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: 549d3f94-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847662; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vEelbM4UoXbBjdC2Us5bYDimWRQuQticI4pfz6oeico=; b=T+gLet/Qmb3dSIIMXRoqQnwYJ5qPh3jKnU4oy7Y9BxZVIRZyxVrHKFEG PM5IOl2nzWHelI1uKfyNwTsq78ZvkWGk2VRd0FOS4NISHXbkGl21ELcXw AsBNm4h9PU3ERE8rBUjG3hoGoyW9ZqGP3hf1265Nw9uaQD4GaiQqVdnL9 M=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: kiNYlP6ps+EhTS7GpsVFJXAhuryKfxsX4qSmy4o2pLY3E555wgD8SFDp8WNABx430lVnCKm2Zg hNvfmhxdcrUSD0kUL6oGwA+xaSStKapOATaDPhj5Z68BeG5ap3OCkTv4JU/cTVAEJ3ySE8H3Vu 7LncXJ1nhRbX1XxgnF6W6ABAy/0Cv3pngpDrdzpXDSxf3y59z94mEe7L5q+aNGB1pFUKkCkPkI HkHsJoWHyEqNOdw/wG5shQQHbqZ1SCZD1WqOcR/eYdqkESxJNaIZlTKvUzjK5Plu3uCTkzw0d4 RhQOsxltAsYO+MkwqlYUp9aA X-SBRS: 5.1 X-MesageID: 59006010 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:k+OSXqDvaCnuuxVW/xzkw5YqxClBgxIJ4kV8jS/XYbTApDMkg2ZRx mYcXW+GPfjcamqkco0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3C7e0lZ1Fug2iGXdVTUMihuOOH1QJJyjXMnJihwb1ym7GcuPNS056AFepppIbR+rL5/zeR5R uUuctmbBqgdUSzO/jkQNMGvrIFreBmxqxiJOi6pPGo2c5J6HlSb8d74ZAr/siIJC3Pv58c5p rSh0CLdQIYCGFs+XJqHNqr3wgro73YHme90U0/ZGfVpeR3hoNpwNij8rv4rOMVQex/N8SSXi lSNChACqOiT/4JsqIvVhbqJppuCGvdlGhYIBHHS6Lu7OHWI/menxoMcAu+EcSqECTHx8aSmI +5U0+v9ILsMm1MT69hwFLNizKQf4drzpuAFklQ4TSuTN1n7WKl9JnSm3NVUsvwfz7BUjgK6R 0aT94QIIr6OIs7kTAYcKQdNgj5vDh3Idu0+NcgIHXg= IronPort-HdrOrdr: A9a23:+P3+8q+rq/NMphSs3SRuk+DeI+orL9Y04lQ7vn2YSXRuHfBw8P re+8jztCWE8Qr5N0tApTntAsS9qDbnhPxICOoqTNOftWvd2FdARbsKheCJ/9SjIVyaygc079 YHT0EUMrPN5DZB4foSmDPIcOod/A== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="59006010" From: Anthony PERARD To: CC: Anthony PERARD , Doug Goldstein Subject: [XEN PATCH v8 16/47] xen/tools/kconfig: fix build with -Wdeclaration-after-statement Date: Thu, 25 Nov 2021 13:39:35 +0000 Message-ID: <20211125134006.1076646-17-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848040303100001 Content-Type: text/plain; charset="utf-8" We are going to start building kconfig with HOSTCFLAGS from Config.mk, it has the flag "-Wdeclaration-after-statement". Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/tools/kconfig/confdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/tools/kconfig/confdata.c b/xen/tools/kconfig/confdata.c index 3569d2dec37c..a69250c91355 100644 --- a/xen/tools/kconfig/confdata.c +++ b/xen/tools/kconfig/confdata.c @@ -1237,6 +1237,7 @@ void set_all_choice_values(struct symbol *csym) =20 bool conf_set_all_new_symbols(enum conf_def_mode mode) { + bool has_changed =3D false; struct symbol *sym, *csym; int i, cnt, pby, pty, ptm; /* pby: probability of bool =3D y * pty: probability of tristate =3D y @@ -1283,7 +1284,6 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode) exit( 1 ); } } - bool has_changed =3D false; =20 for_all_symbols(i, sym) { if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID)) --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848072; cv=none; d=zohomail.com; s=zohoarc; b=iFM9HBpbiOPvYXBWtYHdnHEzOFzyAHQCsVbCcjkCsV8SXd7FJbZ0gFkHKxMthnui5+TJd/2a2eoJM77VB6kE8xBIzHLeWuv0yI1/e5eIR6t7EuTvkEUgeIDf86/YO+tQe8BfV+7M4m4hAl6JTccQCuiLm12mtEC/X6j+8nC2yM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848072; 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=90J2fy7H48I6GtKxqOkm+Tgk1wVMLcWZibyF1/xrDUo=; b=TrkXC9CfQDVzmNjqbeHax5jI5mOZ0mGypCFOEG84MeVcK6DfRBZjU0NQza1/Taq2BQQOYcIFSHgFRNWi9Q9ZUsv4PlLolWMyULOYtTi0z+XE9eCm612WUZbtOZIi7Y3Z9VkPN2LW8zwQ67nVJ3TdMMAE1eBhRwGL8YzddmN1aH4= 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 1637848072991571.0511079400621; Thu, 25 Nov 2021 05:47:52 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231284.400238 (Exim 4.92) (envelope-from ) id 1mqF66-0004iW-Q6; Thu, 25 Nov 2021 13:47:34 +0000 Received: by outflank-mailman (output) from mailman id 231284.400238; Thu, 25 Nov 2021 13:47:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF66-0004fy-IC; Thu, 25 Nov 2021 13:47:34 +0000 Received: by outflank-mailman (input) for mailman id 231284; Thu, 25 Nov 2021 13:47:33 +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 1mqEzw-0007NX-I9 for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:12 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 5662e8e8-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:06 +0100 (CET) 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: 5662e8e8-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847666; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sxCVIENXL7U4uJ6PAJaPF/nE5SLDBzALYwkN0k1BGWI=; b=Ep9XIVirbsQWcyJ24uWe3/3faAB5XVRNqkw8zX3xGfRt8c70mAiGwL75 CctvCSPhYFRrN8bEoYyvx1bIml+zQJw0kiNKaDnRBd2pgX9ezAcocJoAh cVP75lvsu7oU4whfBz7DGAePwuEcOVKO1ieFK406Ss8V8ri64nfqZeSVr 0=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: Ah9LABVBcQ5ud4W8ehu1CUiyw3Vl4ew/y08mOCVWO2lPvIqSL3OQ3EGb70j6tFaVSOPU/cRzHh tqh8TLO0UdGid2HR3kLnb1/7anr5fV2QTh0DU3ddJb7Im96NmJAcfQMJ0wzVYRtsCwLngSXSD8 Eg9BoRFQmgg1kqGf2oNv5a/YfMxVUYTwaSF3xvPE9CXirnjvo09UYnQmuTxnZUbtn0xIXNaa9x RTiMJBonkUXVy6VGsCuS1v0Ou7M8gPCw2cGgscy5b7X+ZukZ/INtGGtosSG6vFSEwi+cnM7oWZ kGdG0DfCduhr+OovybpiIHxU X-SBRS: 5.1 X-MesageID: 60634139 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:8piItqp4+FnnBj/uGEqKOyQLSaFeBmLlYhIvgKrLsJaIsI4StFCzt garIBmAa/yCNGL1eNxzPN/kpEMHupLUn99jQQY+rC0xRC0Q+JuZCYyVIHmrMnLJJKUvbq7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btDJo9FH3fuVbV4puFl09BuS PwJJ5eJDvhVE2yV8DUBd5jt6odlcU3z1w6JOiOkZhk5foJhGFOVqoO1IFO3+XlcFDezuOs/v 6akilHRT60cSlkwF83Rcv+ukQ+85CBPhOJoUkLUCdBPY0GwopNyIin8g6ZvccEBIBnO3BWA0 AOSDUtKrOXBudZtotLImbqFv8GiFO4nRhhWGGzS7LCXMyjG/zX8nd8cAbjQJT2EDTH64qSvY +lR3srQCvxfkQYYqZd4HpZq0bk6u4nlqYhFw1k2B37MdVmqVO9teyHUwclVu6RR7bZFog/qC FmX89xXNLjVasPoFFkdeFgsYuiZjKxGnzDT6bI+IVng5T8x972CCB0AMx6JgS1bDb10LIJ6n rtx5J9Is1Sy2kgwL9KLriFI7GDdfHUPXpIuuoweHIK22BEgzUtPYMCEByL7iH1Vhw6g7qX+z ueouZf/ IronPort-HdrOrdr: A9a23:4gWV6Ko+2+AKFz+8j3UshbgaV5oteYIsimQD101hICG8cqSj+P xG+85rsiMc6QxhIU3I9urgBEDtex7hHNtOkOss1NSZLW3bUQmTTL2KhLGKq1aLJ8S9zJ856U 4JSdkZNDSaNzZHZKjBjDVQa+xQo+W6zA== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634139" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 17/47] build: remove KBUILD_ specific from Makefile.host Date: Thu, 25 Nov 2021 13:39:36 +0000 Message-ID: <20211125134006.1076646-18-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848073927100001 Content-Type: text/plain; charset="utf-8" This will allow $(HOSTCFLAGS) to actually be used when building programmes for the build-host. The other variable don't exist in our build system. Also remove $(KBUILD_EXTMOD) since it should always be empty. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/scripts/Makefile.host | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/xen/scripts/Makefile.host b/xen/scripts/Makefile.host index 8a85f94316bc..d6c358095ee8 100644 --- a/xen/scripts/Makefile.host +++ b/xen/scripts/Makefile.host @@ -82,18 +82,16 @@ host-cxxshobjs :=3D $(addprefix $(obj)/,$(host-cxxshobj= s)) ##### # Handle options to gcc. Support building with separate output directory =20 -_hostc_flags =3D $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ +_hostc_flags =3D $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ $(HOSTCFLAGS_$(target-stem).o) -_hostcxx_flags =3D $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ +_hostcxx_flags =3D $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ $(HOSTCXXFLAGS_$(target-stem).o) =20 # $(objtree)/$(obj) for including generated headers from checkin source fi= les -ifeq ($(KBUILD_EXTMOD),) ifdef building_out_of_srctree _hostc_flags +=3D -I $(objtree)/$(obj) _hostcxx_flags +=3D -I $(objtree)/$(obj) endif -endif =20 hostc_flags =3D -Wp,-MD,$(depfile) $(_hostc_flags) hostcxx_flags =3D -Wp,-MD,$(depfile) $(_hostcxx_flags) @@ -104,17 +102,17 @@ hostcxx_flags =3D -Wp,-MD,$(depfile) $(_hostcxx_flag= s) # Create executable from a single .c file # host-csingle -> Executable quiet_cmd_host-csingle =3D HOSTCC $@ - cmd_host-csingle =3D $(HOSTCC) $(hostc_flags) $(KBUILD_HOSTLDFLAGS) = -o $@ $< \ - $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) + cmd_host-csingle =3D $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $= < \ + $(HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) $(host-csingle): $(obj)/%: $(src)/%.c FORCE $(call if_changed_dep,host-csingle) =20 # Link an executable based on list of .o files, all plain c # host-cmulti -> executable quiet_cmd_host-cmulti =3D HOSTLD $@ - cmd_host-cmulti =3D $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -o $@ \ + cmd_host-cmulti =3D $(HOSTCC) $(HOSTLDFLAGS) -o $@ \ $(addprefix $(obj)/, $($(target-stem)-objs)) \ - $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) + $(HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) $(host-cmulti): FORCE $(call if_changed,host-cmulti) $(call multi-depend, $(host-cmulti), , -objs) @@ -129,10 +127,10 @@ $(host-cobjs): $(obj)/%.o: $(src)/%.c FORCE # Link an executable based on list of .o files, a mixture of .c and .cc # host-cxxmulti -> executable quiet_cmd_host-cxxmulti =3D HOSTLD $@ - cmd_host-cxxmulti =3D $(HOSTCXX) $(KBUILD_HOSTLDFLAGS) -o $@ \ + cmd_host-cxxmulti =3D $(HOSTCXX) $(HOSTLDFLAGS) -o $@ \ $(foreach o,objs cxxobjs,\ $(addprefix $(obj)/, $($(target-stem)-$(o)))) \ - $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) + $(HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) $(host-cxxmulti): FORCE $(call if_changed,host-cxxmulti) $(call multi-depend, $(host-cxxmulti), , -objs -cxxobjs) @@ -163,9 +161,9 @@ $(host-cxxshobjs): $(obj)/%.o: $(src)/%.c FORCE # Link a shared library, based on position independent .o files # *.o -> .so shared library (host-cshlib) quiet_cmd_host-cshlib =3D HOSTLLD -shared $@ - cmd_host-cshlib =3D $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -shared -o $@ \ + cmd_host-cshlib =3D $(HOSTCC) $(HOSTLDFLAGS) -shared -o $@ \ $(addprefix $(obj)/, $($(target-stem)-objs)) \ - $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem).so) + $(HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem).so) $(host-cshlib): FORCE $(call if_changed,host-cshlib) $(call multi-depend, $(host-cshlib), .so, -objs) @@ -173,9 +171,9 @@ $(call multi-depend, $(host-cshlib), .so, -objs) # Link a shared library, based on position independent .o files # *.o -> .so shared library (host-cxxshlib) quiet_cmd_host-cxxshlib =3D HOSTLLD -shared $@ - cmd_host-cxxshlib =3D $(HOSTCXX) $(KBUILD_HOSTLDFLAGS) -shared -o $@= \ + cmd_host-cxxshlib =3D $(HOSTCXX) $(HOSTLDFLAGS) -shared -o $@ \ $(addprefix $(obj)/, $($(target-stem)-objs)) \ - $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem).so) + $(HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem).so) $(host-cxxshlib): FORCE $(call if_changed,host-cxxshlib) $(call multi-depend, $(host-cxxshlib), .so, -objs) --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848071; cv=none; d=zohomail.com; s=zohoarc; b=IFo8WBdcy7F9YSPMBeiEcOin6XL3Ey4d1vSkAWTQO0tPUuY/8Za69wsyfA3yyQKSXWDcfDkeTaNIMEErBrQZPi2NRiWuto3IoERZzAH/8ej4ncJlmwcs8gpJAEx+OAEoJYJZ9yySsIFdh6xEK03npdniV5vupzbHB3AjLy9wy6M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848071; 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=igNkRXl6R3TMi9dxRBat2dg34HAMT8KWUZwSJUKVzcs=; b=DGJQpkNWK9tTEHHwU63TjqYQDFastIV9vdjUF8bfPPsjJFu5Lpe6iSEu9fF7is2mh8zx1UD9r1I6oUVfEhIHetB3+hqFON8ZihnekvvqYKqvXLsZmX34uwtuzSvahlNGIknIV5hpT8ed8EtHk0tJHMd5hSILfwkHPRJ3PdRnF9w= 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 163784807107661.66457156644276; Thu, 25 Nov 2021 05:47:51 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231285.400247 (Exim 4.92) (envelope-from ) id 1mqF68-000533-If; Thu, 25 Nov 2021 13:47:36 +0000 Received: by outflank-mailman (output) from mailman id 231285.400247; Thu, 25 Nov 2021 13:47:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF67-0004yO-PE; Thu, 25 Nov 2021 13:47:35 +0000 Received: by outflank-mailman (input) for mailman id 231285; Thu, 25 Nov 2021 13:47:33 +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 1mqEzv-00076i-P6 for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:11 +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 5816b795-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:09 +0100 (CET) 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: 5816b795-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847669; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZCs/Xx5M756MIsDnJYXw+m9V8UisU6uX8z4z8/g/Ths=; b=WiVegfMAoCwRYivSU2ZTqyaubOCr1QY35zqMQhLs+WFMRZpjN9W1q5iy lKMzwQz1ume4s6jlZUbBU8qrvTx/neY2XHAi0c7K6RjFb1dFo9YPxlLYf oduimfdlx1anCCMDl+PhTMxnK6dRaCjImEPW9Rxhv2PcMs93HeTuzWmj6 g=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 4tr52D3X9HWXH1iw01BXLR6ba5oDHtKx8Ef7AFctZoE/TgiC34JWwhwPzbwPKM8XqFmbgOk43n qvvrVOFDhgVvfTcwilUhRu673NXyD2ZcoUiD1Wui2UCqTelfKOSYEBCwIdBnuRE2kJYJGpxZWU gHBaHnOxXaNVHPf+2JgB3txYNyjWf9gr3RuxTcX/3lpgKodoZDoxvfnjmF1/cVakSSgBS8ADAs pXfmdRcjMpIAjgwnfL+Eh0EmtIXI35dG5AmGXNFJBKkYp86FrfFt6M3vJhqexBdy08dtC7vgHf PQVV2542W2I8meLjAhZEdSIF X-SBRS: 5.1 X-MesageID: 58617668 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronP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q 4w3H5LTk313CbSiCgGKod97BQ1bdhATWMGpw/G7g8bee2KK7kl6UKSPqV7gEqQ495loehDgo ivgBxQGkQWn3hUq62yiMxheVV8mZr4nxVpTAMDmFQzAN6ELbdn94aEBWYEweLV7puVvweQtF 6sOetmaA+QJQTPComxPYZ74pY1kVRKqmQPRYHb1PGlhJ8ZtF17T59vpXgrz7y1SXCC5gtQz/ u+73QTBTJtdGwk7VJTKaOiixk+atGQGnL4gRFPBJ9ReIR2+8IVjJyHroOUwJsUAdUfKyjeAj l7EChYEv+jd5YQy9YCR16yDqo6oFcp4H1ZbQDaHverna3GC8zP6k4FaUeuOcTTMb0/O+f2vN bdP0vXxEPwbh1IW4YByJKlmkPAl7Nz1qr4Ekgk9RCfXb06mA69LK2Wd2ZUdrbVEw7JUtFfkW k+L/dUGa7yFNNm8TQwULQshKO+CyesVin/Z6vFseBf24yp+/bymV0ROPkbT1HwBfeUtaI51k /08vMM26hCkjkt4O9mLuSlY6mCQIyFSSK4grJwbXNfmhwdDJouuunAA5vsaOK2yVug= IronPort-HdrOrdr: A9a23:4DuZ96O7XnbBsMBcTvmjsMiBIKoaSvp037Eqv3oedfUzSL3gqy nOpoV86faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrZ uIGJIeNDSfNzdHZL7BkWuFL+o= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58617668" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 18/47] build: handle always-y and hostprogs-always-y Date: Thu, 25 Nov 2021 13:39:37 +0000 Message-ID: <20211125134006.1076646-19-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848071678100003 Content-Type: text/plain; charset="utf-8" This will be used for xen/tools/. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/Rules.mk | 10 +++++++++- xen/scripts/Makefile.clean | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index f452a821cc86..9eb3093f43fb 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -78,9 +78,17 @@ else obj-y :=3D $(filter-out %/, $(obj-y)) endif =20 +# hostprogs-always-y +=3D foo +# ... is a shorthand for +# hostprogs-y +=3D foo +# always-y +=3D foo +hostprogs-y +=3D $(hostprogs-always-y) +always-y +=3D $(hostprogs-always-y) + # Add subdir path =20 extra-y :=3D $(addprefix $(obj)/,$(extra-y)) +always-y :=3D $(addprefix $(obj)/,$(always-y)) targets :=3D $(addprefix $(obj)/,$(targets)) lib-y :=3D $(addprefix $(obj)/,$(lib-y)) obj-y :=3D $(addprefix $(obj)/,$(obj-y)) @@ -283,7 +291,7 @@ targets +=3D $(call intermediate_targets, .init.o, .o) \ # Build # ------------------------------------------------------------------------= --- =20 -__build: $(targets-for-builtin) $(subdir-y) +__build: $(targets-for-builtin) $(subdir-y) $(always-y) @: =20 # Descending diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index 156d6307cf83..c2689d4af5fa 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -18,7 +18,8 @@ subdir-all :=3D $(subdir-y) $(subdir-n) $(subdir-) \ $(patsubst %/,%, $(filter %/, $(obj-y) $(obj-n) $(obj-))) =20 __clean-files :=3D \ - $(clean-files) $(hostprogs-y) $(hostprogs-) + $(clean-files) $(hostprogs-y) $(hostprogs-) \ + $(hostprogs-always-y) $(hostprogs-always-) =20 __clean-files :=3D $(wildcard $(__clean-files)) =20 --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848054; cv=none; d=zohomail.com; s=zohoarc; b=FM+fnq7x+ntG+e4CdCHhQFF5a/vzc/JMSgQ7IJS78wNNhGpyRGHfbmHKhOzLm23c4H3YCFqN37SsjNx4uwfiHMfiqVv24Q8SqCUDGbUlvo8DDknq6xemEgvEIl6F0ISsLUlF6TFuxQTYvgaeNXtXg5EqRSJBVfi4/KmcpVbWHrc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848054; 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=r8H2myT5vIDN5Ok1WfC6fQ2f8MGxFXBRovsITIPlxaE=; b=Z4z+249DhP8CQcMHoN5g0xL1Bq6FfMpPqc0p2ikFyA1iz+ah9ayeaX7kKvuiFJXsptHLkBf+Lv8yyVWxXqMC3WYiAd6qZC6qKMiW/AVfWe7ltLnJ6SSgm3pUL2sOaIa08P3DPqKI5fDNsPlUwrhmWXI8S8txhn9agAapjMxE8hM= 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 1637848054717435.1354785513738; Thu, 25 Nov 2021 05:47:34 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231270.400158 (Exim 4.92) (envelope-from ) id 1mqF5r-0001BP-6j; Thu, 25 Nov 2021 13:47:19 +0000 Received: by outflank-mailman (output) from mailman id 231270.400158; Thu, 25 Nov 2021 13:47: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 1mqF5q-000194-Tk; Thu, 25 Nov 2021 13:47:18 +0000 Received: by outflank-mailman (input) for mailman id 231270; Thu, 25 Nov 2021 13:47:17 +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 1mqEzy-00076i-P9 for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:14 +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 5a7a50e9-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:13 +0100 (CET) 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: 5a7a50e9-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847673; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=O5L3e+/QWAIYcXnmaAXON9qB0LMfM8CPOGv64fGj7qI=; b=eGyctOjtnmeZ2i899/lqpzSqn3sXfGV1YeODwWDGEpZ1NGZ+75RxHOlg JLz7LGh3fH5DG6l9C06Swh51iTBrnIL1cFbrHsJD7mgjL0EoCkFRVc+NR TpiP6y9bavEFreOEKuDwsa7CjI4B8Sdp4e1Vgu2GJ9qBzgXB4Kj9k7J95 8=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: OgJ3nwaUpoZTKcCPv1tZzCxhmQR4WBJmtd80mDJgs5ZnQM8ptTpeJ2P8lKfIZSInQtxfh4aZY3 jQa2YS+2Om044U+HrD5FQc6k1OK4ohL4pBDvYHmxTyOxFCuIn0w+ecRWs7iLbQp4mB32+R7UsO gZtPlKWUSX4dTktJyb3hj06paPmum/8ASjqLZGEIJsjpDDUtRVOU9WwiXTelD4ZmuTSuLUbX0U FL3aMXKcsnOrD3bLB61dft4xswjb2z5EX9j/uPNCfhxJYLzoL7ZOi7PE4T4OrAGx1yX5Gv6pec NOPsRZc1JcOLCv+QxMNkIpds X-SBRS: 5.1 X-MesageID: 58576689 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:9XcTdqIHEX5AxomTFE+RLJIlxSXFcZb7ZxGr2PjKsXjdYENSgTQFy GJLUGyDa/eMZjHyKNh+PYW/8kIA7Z/Rn4dhGlRlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUZUideSc+EH140Es5xrZj6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB2jufRSy PdVs6WOajwXH4uSp7sQUD5HRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsFlgNgjK8/6epsSoHh6wRnSDOo8QICFSKLPjTNd9Gpg258QQ6aPD yYfQR9PSjXGQxRLAF0WGbgXrcetiCn8XAQN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ZYADY630gcmxzmuu3AH5vMaNH1XV+hxDw== IronPort-HdrOrdr: A9a23:adKVb6tFOiidshepDXN0TTry7skDTtV00zEX/kB9WHVpmszxra 6TdZMgpHnJYVcqKQkdcL+7WJVoLUmxyXcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyIMbEQt6fHCWeDfOrIuOP3kpyVuQ== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58576689" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 19/47] build: start building the tools with the main makefiles Date: Thu, 25 Nov 2021 13:39:38 +0000 Message-ID: <20211125134006.1076646-20-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848055596100006 Content-Type: text/plain; charset="utf-8" This will make out-of-tree build easier. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v8: - add some $(Q) xen/Makefile | 8 ++++---- xen/tools/Makefile | 17 ++--------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index c26c44818916..06d5e4fd61c1 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -209,7 +209,7 @@ endif # root-make-done =20 PHONY +=3D tools_fixdep tools_fixdep: - $(MAKE) -C tools fixdep + $(Q)$(MAKE) $(build)=3Dtools tools/fixdep =20 ifeq ($(config-build),y) # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D @@ -247,7 +247,7 @@ ifeq ($(need-config),y) # "tools_fixdep" which is a .PHONY target and would force make to call # "defconfig" again to update $(KCONFIG_CONFIG). tools/fixdep: - $(MAKE) -C tools fixdep + $(Q)$(MAKE) $(build)=3Dtools tools/fixdep =20 # Allow people to just run `make` as before and not force them to configure $(KCONFIG_CONFIG): tools/fixdep @@ -409,7 +409,7 @@ _debug: =20 .PHONY: _clean _clean: - $(MAKE) -C tools clean + $(MAKE) $(clean) tools $(MAKE) $(clean) include $(MAKE) $(clean) common $(MAKE) $(clean) drivers @@ -438,7 +438,7 @@ $(TARGET).gz: $(TARGET) mv $@.new $@ =20 $(TARGET): FORCE - $(MAKE) -C tools + $(Q)$(MAKE) $(build)=3Dtools $(Q)$(MAKE) $(build)=3D. include/xen/compile.h [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch])= ; \ do test -r arch/$(TARGET_ARCH)/efi/$$f || \ diff --git a/xen/tools/Makefile b/xen/tools/Makefile index 722f3664549d..a5078b7cb8de 100644 --- a/xen/tools/Makefile +++ b/xen/tools/Makefile @@ -1,15 +1,2 @@ - -include $(XEN_ROOT)/Config.mk - -.PHONY: default -default: symbols fixdep - -.PHONY: clean -clean: - rm -f *.o symbols fixdep - -symbols: symbols.c - $(HOSTCC) $(HOSTCFLAGS) -o $@ $< - -fixdep: fixdep.c - $(HOSTCC) $(HOSTCFLAGS) -o $@ $< +hostprogs-always-y +=3D symbols +hostprogs-always-y +=3D fixdep --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848103; cv=none; d=zohomail.com; s=zohoarc; b=bWyvbK6A5TO0Zdxk6FfdCOfjaeI8v7wxNIFLs9cfz2SRkyDklZ5fNP4EBUdWpFtLv9giZOjJPvWBMC85A3lZgtYcYKQG2NcZkLvets29m7LrWim8Pxo/Cs3eI7Uv7EMyZGnWoTaHYfLxuw56nvFRUSa7isIjsXUEY3JpN1GuYuc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848103; 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=hLYwUmR0SbuJtoTrPSCs2mYVfh0s2KZpzP1kAuF4/OE=; b=FuYi8tO1kEb4vBfacXsucpgy/Fta68isgHjFiq5RFlFSP3q2THQr+BDGBxlJFgp3UXn+6Ei9o/3lU17a3yiZpXzLj/+bSPNshTrjcsFoFe1suitdx3ZQ0SXhJeAroiUo64q6aVyvpUEOMQ3C0DFnCARq6Xi3ibQpjhmFrGnglHU= 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 1637848103127594.9388952585645; Thu, 25 Nov 2021 05:48:23 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231316.400373 (Exim 4.92) (envelope-from ) id 1mqF6Z-0002tl-0V; Thu, 25 Nov 2021 13:48:03 +0000 Received: by outflank-mailman (output) from mailman id 231316.400373; Thu, 25 Nov 2021 13:48: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 1mqF6Y-0002oB-Cc; Thu, 25 Nov 2021 13:48:02 +0000 Received: by outflank-mailman (input) for mailman id 231316; Thu, 25 Nov 2021 13:47:59 +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 1mqF0M-00076i-E7 for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:38 +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 685bd498-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:36 +0100 (CET) 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: 685bd498-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847696; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Dp4DeV5YFxptZKOsxSf8G7BcD3VPnKgmN4ccZ4WdFIE=; b=SrCxHYmj/Azw1jVXQJXNoCkKaEAKsponODLiAWj5MOL0hAtGtD6Yhxge yUsyvEvkhanIuN7XqWLa0tG9a+ZefTzBdPMj6WUdKDrdoDG+uuGR8lIdr MO0E6EkSANwu7g57R+/E06ilPpu7N65KHNN6J4k8tMLqI6l3S+X5nSVbz U=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 65FyAc2QaZf80z0I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KSI3jFpmMkcADz8R1AfXEWUqh7r1l8EtGzFVE35BGXCIVo0NfuJ4E1EoXlXeSJW/ e3AxWvoOdowkBodAsfmtZZZlsHe IronPort-HdrOrdr: A9a23:g3Pg06outmdlW0nrZbPZbmIaV5oTeYIsimQD101hICG8cqSj+f xG+85rsyMc6QxhIE3I9urhBEDtex/hHNtOkOws1NSZLW7bUQmTXeJfBOLZqlWKcUDDH6xmpM NdmsBFeaTN5DNB7PoSjjPWLz9Z+qjkzJyV X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58637853" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , "Bertrand Marquis" , Bob Eshleman , Alistair Francis , Connor Davis , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v8 20/47] build: add headers path to CFLAGS once for all archs Date: Thu, 25 Nov 2021 13:39:39 +0000 Message-ID: <20211125134006.1076646-21-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848103480100003 Content-Type: text/plain; charset="utf-8" This just remove duplication. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich Acked-by: Julien Grall --- xen/Makefile | 3 +++ xen/arch/arm/arch.mk | 3 --- xen/arch/riscv/arch.mk | 2 -- xen/arch/x86/arch.mk | 2 -- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 06d5e4fd61c1..efd7538099f3 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -312,6 +312,9 @@ CFLAGS +=3D -flto LDFLAGS-$(CONFIG_CC_IS_CLANG) +=3D -plugin LLVMgold.so endif =20 +CFLAGS +=3D -I$(srctree)/include +CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include + # Note that link order matters! ALL_OBJS-y :=3D common/built_in.o ALL_OBJS-y +=3D drivers/built_in.o diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index 4e3f7014305e..094b67072304 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -1,9 +1,6 @@ ######################################## # arm-specific definitions =20 -CFLAGS +=3D -I$(srctree)/include -CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include - $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) $(call cc-option-add,CFLAGS,CC,-Wnested-externs) =20 diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index 694ba053ceab..ae8fe9dec730 100644 --- a/xen/arch/riscv/arch.mk +++ b/xen/arch/riscv/arch.mk @@ -11,5 +11,3 @@ riscv-march-$(CONFIG_RISCV_ISA_C) :=3D $(riscv-marc= h-y)c # -mcmodel=3Dmedlow would force Xen into the lower half. =20 CFLAGS +=3D -march=3D$(riscv-march-y) -mstrict-align -mcmodel=3Dmedany -CFLAGS +=3D -I$(srctree)/include -CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 5152de343082..1ba488d645c0 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -3,8 +3,6 @@ =20 export XEN_IMG_OFFSET :=3D 0x200000 =20 -CFLAGS +=3D -I$(srctree)/include -CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-generic CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-default CFLAGS +=3D -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848041; cv=none; d=zohomail.com; s=zohoarc; b=I8Gb2GxkfQspBcw+cDvWIQQZwSjKZw16UEdZ56EXRgmu/1jLagLUDRMIFFxsMAolcxS5+sjUtMBO6jaI9soltFX+rrsgpBZ0vNTWZ9D6AN2/njI5uZG4tdUi9pZbq9ITk2aeAGMFjtW7CauqbdJgexwaOAPCsDQUw7Qx2jOpoRY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848041; 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=NJ9BbZ1oEivPzVkza+yLQpydkF6x4kRW96Lqv4196Fs=; b=HcKWIDj9DYiGeZWxad/8xSglxOXB2iK/hotB3iDmetIZ5L7lMMG4zCj/D5n/9zsAr09anWXHuQu869V5pGwA6wOj/WNeEHJx/1Yltx+tpao1w22qapjKQolMyzuenMfyEdphHjVO8QzbUR9QudyoDPViLnHEhO4wMvBfzsvQaqM= 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 1637848041903685.6666799772441; Thu, 25 Nov 2021 05:47:21 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231234.400068 (Exim 4.92) (envelope-from ) id 1mqF5R-00063K-S3; Thu, 25 Nov 2021 13:46:53 +0000 Received: by outflank-mailman (output) from mailman id 231234.400068; Thu, 25 Nov 2021 13:46:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5R-00063D-Oj; Thu, 25 Nov 2021 13:46:53 +0000 Received: by outflank-mailman (input) for mailman id 231234; Thu, 25 Nov 2021 13:46:53 +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 1mqF03-00076i-MS for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:19 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5d8200b7-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:18 +0100 (CET) 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: 5d8200b7-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847678; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5TWrEHNuNLFROz3IyERYFp+CoH2z9NcBZf52JXIU9Zw=; b=OxaSsMKuzrPIsRZNm1xSDw7YyruEdOv241n+BjGMXSVYxAA7gR1bBwd1 1MSCXjp/RrQ+vDJlBJRDEK8UFQ7/j1HXecWTqXVnUbcEcO+FvuBf95y1s b45bE7AkNoUP5GhIft9nj2Ncxs+bRuetAOah0EaGF5wcUPBZq3hLFLbwv s=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: RVJ7aAuQBHjZzqUlN7p4V1rdCRaDfIEJlzz8d/c0C8arvfBn/HNxit/kNlsINYx6LsUPqaP9TQ BgnaggibGTylRaa8+lZ7Tj0c6n5WTwdW4YS9RqcjIMeZHXSsOAYBY6YKyEJ7QClXSQRKv7Y2Ip 4bGyZ/RllGZZ48cnjfgvFCjDsbxRyiJezD453YtfaGuBAEHtOZ0IAySYpIZDa9USk0kCg9kuxr ya4qJ3Ug4R3FQgQ85mKuYDSBhFbcxyQPp0dxpgDYJpuPaOKOdxy4oizaF3LOeZDhDNAAle4/Aj Spg1svLVHGs38fgEfaip5jYc X-SBRS: 5.1 X-MesageID: 59006026 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:fcA6BKLtsTbQAWS6FE+R6JIlxSXFcZb7ZxGr2PjKsXjdYENSgWAAz DNKXT/SOPjZZGv3f9hyOo3j901UvZDUyNBnSARlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUZUideSc+EH140Es5xrZj6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB2Lndt30 cd3r6buCi1wIPPVxO8AVENXRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsFlgNgjK8/6epsSoHh6wRnSDOo8QICFSKLPjTNd9Gph3pgQRayAD yYfQQU+XTTEbw19Bmo4A5hunsa2qHn9cwQN/Tp5ooJoujOOnWSdyoPFL979atG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ZJhOo7G90cW7LE80sKQFg7X5Xo3SODUO2lHJEGgK1+KLqFfd8m/Fh4tgPM 9bAs5D4bbLY2SS4/yX3ODBKadC/OW6 X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="59006026" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v8 21/47] build: generate x86's asm-macros.h with filechk Date: Thu, 25 Nov 2021 13:39:40 +0000 Message-ID: <20211125134006.1076646-22-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848043427100001 Content-Type: text/plain; charset="utf-8" When we will build out-of-tree, make is going to try to generate "asm-macros.h" before the directories "arch/x86/include/asm" exist, thus we would need to call `mkdir` explicitly. We will use "filechk" for that as it does everything that the current recipe does and does call `mkdir`. Also, they are no more "*.new" files generated in this directory. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/arch/x86/Makefile | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 456b7eed7536..873b32cc6945 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -230,18 +230,21 @@ include: $(BASEDIR)/arch/x86/include/asm/asm-macros.h $(obj)/asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P =20 $(BASEDIR)/arch/x86/include/asm/asm-macros.h: $(obj)/asm-macros.i $(src)/M= akefile - echo '#if 0' >$@.new - echo '.if 0' >>$@.new - echo '#endif' >>$@.new - echo '#ifndef __ASM_MACROS_H__' >>$@.new - echo '#define __ASM_MACROS_H__' >>$@.new - echo 'asm ( ".include \"$@\"" );' >>$@.new - echo '#endif /* __ASM_MACROS_H__ */' >>$@.new - echo '#if 0' >>$@.new - echo '.endif' >>$@.new - cat $< >>$@.new - echo '#endif' >>$@.new - $(call move-if-changed,$@.new,$@) + $(call filechk,asm-macros.h) + +define filechk_asm-macros.h + echo '#if 0'; \ + echo '.if 0'; \ + echo '#endif'; \ + echo '#ifndef __ASM_MACROS_H__'; \ + echo '#define __ASM_MACROS_H__'; \ + echo 'asm ( ".include \"$@\"" );'; \ + echo '#endif /* __ASM_MACROS_H__ */'; \ + echo '#if 0'; \ + echo '.endif'; \ + cat $<; \ + echo '#endif' +endef =20 $(obj)/efi.lds: AFLAGS-y +=3D -DEFI $(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE @@ -255,7 +258,7 @@ $(obj)/efi/mkreloc: $(src)/efi/mkreloc.c =20 .PHONY: clean clean:: - rm -f *.lds *.new boot/*.o boot/*~ boot/core boot/mkelf32 + rm -f *.lds boot/*.o boot/*~ boot/core boot/mkelf32 rm -f asm-macros.i $(BASEDIR)/arch/x86/include/asm/asm-macros.* rm -f $(BASEDIR)/.xen-syms.[0-9]* boot/.*.d $(BASEDIR)/.xen.elf32 rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi efi/mkreloc --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848087; cv=none; d=zohomail.com; s=zohoarc; b=PDB3jFLk+m9mgrmh41RC1KFyn+pSmrAKdxqbvmZyj+dm3MUgjUdc1W4nvyZxYLivuMJU8wychAj9MFfgcVqMUxctcRyPsk3JcS40T2jqWr9GLG913FY3e+VkiDOkmLvI9OjifLV8rEruIUyJ3yis8esnivdFWrIOULnBCv41H5k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848087; 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=h7AbqYYZatD2J8Ihk2BIU3RxVAW12nBHyOKG9/JATVQ=; b=L7lML6i1EcxxolODkatIIwHoq+UTzTqquUF00IslFpGbTZxwtPlYYqGezHmS8Od/uQvRgkf4kKTY5/nDr2AI7s7bnjHke0pCM8wDlTJlGWUDu5WJOtnRmWhuNKYnpplgTLiL5CCoUpDPNcYsXHWs54moEbXIEaWGa3qOnH8Esh0= 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 1637848087226296.6041012455038; Thu, 25 Nov 2021 05:48:07 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231302.400306 (Exim 4.92) (envelope-from ) id 1mqF6J-0007mF-OU; Thu, 25 Nov 2021 13:47:47 +0000 Received: by outflank-mailman (output) from mailman id 231302.400306; Thu, 25 Nov 2021 13:47:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6J-0007ik-CK; Thu, 25 Nov 2021 13:47:47 +0000 Received: by outflank-mailman (input) for mailman id 231302; Thu, 25 Nov 2021 13:47:44 +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 1mqF07-00076i-0u for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:23 +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 5f243f17-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:21 +0100 (CET) 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: 5f243f17-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847681; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=d7L+BRvnt90Hp6EYFj08PtOu1B6y0dzvxWI579G6mSU=; b=AUBcTIRS/MqUSTNhoo/FvR4nGQZtz1AaMGfzGeKV8skS0SWqy3VOk9ev nKr7shmRjvgBBvHIF12klRZIJFxxgsNi8XzMhFJE3XFVoljGc5wPe6PDN GA6qqlYnZFf/XOIdeTctGIAkmvlis0O2/JSO4Poa/KhchLFaztaZjfzPp U=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: xcR41wA12mhyuG6hnSih+BSTv6MWqH3VHV7A01w/odP3DYU/Vw0g1Yvp+38plcAxI/Ux6QuDCe z1kAV9vdIF+jPFTIaeZ7NcAqKhWxb/WJPedjE/5wqBKHUwr1sjb6t+k9jDTY0VydidkqB+Pvtu 2g7+4n2+/kX4NqJY3zFGlOZ01e1usjKC/2ZrCrGKghtRbE3c7GZx+BjiV319G3GNEZ7GLDMKCV TQiY3zQWTCNcDiA+hZ393lzAzGfO8JwM1frmuwkwSdD7GjRws0GD3teA+iDoiQT0gIctkGKKN9 oIEJgg2ilJXerFkfaHlcq9Uq X-SBRS: 5.1 X-MesageID: 60634148 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:65SiDqmXsfM632oFlo0p07vo5gz/IERdPkR7XQ2eYbSJt1+Wr1Gzt xJMWGyFbvmOMWX3Ktt0YIizp0MPu5aByodrGwJvqShhQSMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BClVlxJVF/fngqoDUUYYoAQgsA187IMsdoUg7wbdg29Q12YLR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 JZmu76QSwduB5fdisoWfyJJHwtQLLITrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBMDtIIMYvGAm1TzDBOwqaZvCX7/L9ZlT2zJYasVmQ66AP JZANWoHgBLoczNrGkU6AZIHwdyIvynkUwZKhHGOjP9ii4TU5FMoi+W8WDbPQfSASN9JhE+eq iTD9n7gHxABHNWFzHyO9XfErtHImST3SYcDDoqS//RhgECQ7mELARhQXly+ydG6jUikUt4ZN E0Q+QIpt6E58EHtRd74NzW0uGWBvwIcc9NIHvcm9RqWza7J/weeAHNCRTlEAPQqu8M7SiYj/ kOYlNPuQzp0ufuaTmz13qiQhSO/P24SN2BqTS0OQBYB4tLjiJoulR+JRdFmeIalg9uwFTzuz jSiqCklm65VncMNz7+8/13Mn3SrvJehZg8q5C3HU2S99AR7aYW5IYuy5jDz9u1cJYyUSl2Au nksmMWE6u0KS5aXm0SlQvgJHbyvz+aINnvbm1EHInU6323zoTj5J9kWuWwgYhcy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X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634148" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , "Bertrand Marquis" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Konrad Rzeszutek Wilk , "Ross Lagerwall" , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v8 22/47] build: clean-up "clean" rules of duplication Date: Thu, 25 Nov 2021 13:39:41 +0000 Message-ID: <20211125134006.1076646-23-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848089198100001 Content-Type: text/plain; charset="utf-8" All those files to be removed are already done in the main Makefile, either by the "find" command or directly (for $(TARGET).efi). Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Acked-by: Julien Grall --- xen/Makefile | 2 +- xen/arch/arm/Makefile | 1 - xen/arch/x86/Makefile | 5 ++--- xen/test/livepatch/Makefile | 2 +- xen/xsm/flask/Makefile | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index efd7538099f3..86bcedd7fa5b 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -428,7 +428,7 @@ _clean: -o -name ".*.o.tmp" -o -name "*~" -o -name "core" \ -o -name '*.lex.c' -o -name '*.tab.[ch]' \ -o -name "*.gcno" -o -name ".*.cmd" -o -name "lib.a" \) -exec rm -f {} \; - rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map *~ core + rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map rm -f asm-offsets.s arch/*/include/asm/asm-offsets.h rm -f .banner .allconfig.tmp include/xen/compile.h =20 diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index fd24f0212ffa..3ce5f1674f6f 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -120,4 +120,3 @@ $(obj)/dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) clean:: rm -f $(obj)/xen.lds rm -f $(BASEDIR)/.xen-syms.[0-9]* - rm -f $(TARGET).efi diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 873b32cc6945..0b0ef6205bc1 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -258,9 +258,8 @@ $(obj)/efi/mkreloc: $(src)/efi/mkreloc.c =20 .PHONY: clean clean:: - rm -f *.lds boot/*.o boot/*~ boot/core boot/mkelf32 + rm -f *.lds boot/mkelf32 rm -f asm-macros.i $(BASEDIR)/arch/x86/include/asm/asm-macros.* - rm -f $(BASEDIR)/.xen-syms.[0-9]* boot/.*.d $(BASEDIR)/.xen.elf32 + rm -f $(BASEDIR)/.xen-syms.[0-9]* $(BASEDIR)/.xen.elf32 rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi efi/mkreloc rm -f boot/cmdline.S boot/reloc.S boot/*.lnk boot/*.bin - rm -f note.o diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index afb8d589ecae..adb484dc5d2c 100644 --- a/xen/test/livepatch/Makefile +++ b/xen/test/livepatch/Makefile @@ -162,4 +162,4 @@ uninstall: =20 .PHONY: clean clean:: - rm -f *.o .*.o.d *.livepatch config.h expect_config.h + rm -f *.livepatch config.h expect_config.h diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 49cf730cf098..832f65274cc0 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -51,4 +51,4 @@ $(obj)/policy.bin: FORCE =20 .PHONY: clean clean:: - rm -f $(ALL_H_FILES) *.o $(DEPS_RM) policy.* $(POLICY_SRC) flask-policy.S + rm -f $(ALL_H_FILES) policy.* $(POLICY_SRC) flask-policy.S --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848098; cv=none; d=zohomail.com; s=zohoarc; b=DZRwf27aqPfNXs0qC+JddOYb21ywZlLT60mAKvYag0xNgIBeW12L+XYq1NvUfK7Fv0vUmn5Y4c/7KeS66PHc1MoLHynf6TwrjXTA8Gm/sDbgUxLWpxFDtfSrMwWKlEigjWeAarCYpN95c8Do6OC3H5+fxq8PH109lB/PYnWH8zU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848098; 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=kvETx9EwtEBeuppA52WCnmCZVhdbkhWKUzATGp6z01A=; b=ZDET0Zcw4RiuHhF1e0Os839Yx6WML13D5ZwiO+eZw563tq9xLsUhp/1nODt++1UGeg7BbCiFlXtWBW/0xMjBNfkzX6vdVjYrdjOAoo1pdfFWtoNHKcGXsEYNCP9jSNn4EZXBZdCjhQJUru3hTswT1RO3lTgWd9olTQo/gfpCYhQ= 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 1637848098295337.8322105018751; Thu, 25 Nov 2021 05:48:18 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231308.400333 (Exim 4.92) (envelope-from ) id 1mqF6P-0000eI-Kp; Thu, 25 Nov 2021 13:47:53 +0000 Received: by outflank-mailman (output) from mailman id 231308.400333; Thu, 25 Nov 2021 13:47:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6O-0000ZX-IM; Thu, 25 Nov 2021 13:47:52 +0000 Received: by outflank-mailman (input) for mailman id 231308; Thu, 25 Nov 2021 13:47:51 +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 1mqF0A-0007NX-5Z for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:26 +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 611e7cb7-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:24 +0100 (CET) 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: 611e7cb7-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847684; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ObpVRqOSVUZVbZvKGeecU4tcVcjIvrlnjGlAoQ30NGE=; b=Qza5s+vYB9/u2LpE52KTQkcRfYF3dwZlEMDW7RJ4Wfe3PHyd4IXWOL/c l/i2ihkEFR/Bez+xV/kH9IPF2tv7Na7R9dbdzx7XYsN7rT3LUxURZqYhZ qEuUb57u9z0PYB7T+aETLtd3iTIC8RdBBTtdoIDgxY36fJ3uHc6xlx3vG A=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: +CeJllXYb1/n54e25C6MAweqAlhFeSD7maoeJInops44rxq6go37uZC2dOpOjSJEWlgGnnFetu 9TA13vmjsvW8f9hZ7VsZECaUDD/FHT+slYZ8SBJGa6ZBPeVB3h76WWI21iRBJtnMT13i4Dg/qW VG/RzdN/76vEpt1ddGleD2BBx+guR0yWhGeaB01eD5Za8HwWcaM+vnoGo/dHh40YS3pMXeyRxr RlynoO7Tx3OF8YNBvvBIf8Wff8Eu6kublz9H8Q0IcYA3MIsaM1c+ArsfBg60D2lb8tMD9ddZe/ U0RW3h9/U3xonQVQ3U5M2TL+ X-SBRS: 5.1 X-MesageID: 58135473 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:bY3KEql69tpLo1WFVlKqWFjo5gz/IERdPkR7XQ2eYbSJt1+Wr1Gzt xIXCjuPa/yKMGuhfIxwOovkpBlUvJSDyd5hHAY5pS5jESMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BClVlxJVF/fngqoDUUYYoAQgsA187IMsdoUg7wbdg29Q12YLR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 Ilsn82LCh4xB7znh+QWdQVyATphIrITrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA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7d4cFTPLiEYZu3EFMYKAc/QP6E0PUYxmvb4fgveR2o7y5r5ruXF05VOkDU2iBaKbJ0NqIjw Psg55FKu1Du1EJyP4/f3C5O9mmKIngRaIkdt8kXUN3xlw4m6lBeepiAWCX4146CNodXOU4wL z7K2Keb3+ZAxlDPemYYHGTW2bYPnowHvR1HwQNQJ1mNndaZ1PY70AcIrGYyRwVRiB5Gz/hyK i5gMEgsffeC+DJhhc5iWWGwGl4eWE3FqxKpk1ZZxnfES0SIV3DWKDxvMOmAy0kV7mZAc2UJ5 7qf0mvkDW7nccyZMvHegqK5RygPleBMyzA= IronPort-HdrOrdr: A9a23:phGQ26xlNbIkAKNOYXLnKrPwFL1zdoMgy1knxilNoRw8SKKlfq eV7ZImPH7P+U4ssR4b+exoVJPtfZqYz+8R3WBzB8bEYOCFghrKEGgK1+KLqFeMJ8S9zJ846U 4JSdkGNDSaNzlHZKjBjzVQa+xQouW6zA== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58135473" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , "Bertrand Marquis" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Konrad Rzeszutek Wilk , "Ross Lagerwall" , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v8 23/47] build: rework "clean" to clean from the root dir Date: Thu, 25 Nov 2021 13:39:42 +0000 Message-ID: <20211125134006.1076646-24-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848100320100001 Content-Type: text/plain; charset="utf-8" This will allow "clean" to work from an out-of-tree build when it will be available. Some of the file been removed in current "clean" target aren't added to $(clean-files) because they are already listed in $(extra-) or $(extra-y). Also start to clean files listed in $(targets). This allows to clean "common/config_data.S" and "xsm/flask/flask-policy.S" without having to list them a second time. Also clean files in "arch/x86/boot" from that directory by allowing "clean" to descend into the subdir by adding "boot" into $(subdir-). Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v8: - fix comment for the shorthand - move this patch earlier in the series - replace some BASEDIR by objtree - start to clean $(targets) files. xen/Makefile | 24 ++++++++++++------------ xen/arch/arm/Makefile | 5 +---- xen/arch/x86/Makefile | 20 ++++++++++++-------- xen/arch/x86/boot/Makefile | 2 ++ xen/common/Makefile | 3 +-- xen/include/Makefile | 4 +--- xen/scripts/Kbuild.include | 4 ++-- xen/scripts/Makefile.clean | 14 +++++++++++--- xen/test/livepatch/Makefile | 4 +--- xen/xsm/flask/Makefile | 4 +--- 10 files changed, 44 insertions(+), 40 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 86bcedd7fa5b..deae319c8a5a 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -412,18 +412,18 @@ _debug: =20 .PHONY: _clean _clean: - $(MAKE) $(clean) tools - $(MAKE) $(clean) include - $(MAKE) $(clean) common - $(MAKE) $(clean) drivers - $(MAKE) $(clean) lib - $(MAKE) $(clean) xsm - $(MAKE) $(clean) crypto - $(MAKE) $(clean) arch/arm - $(MAKE) $(clean) arch/riscv - $(MAKE) $(clean) arch/x86 - $(MAKE) $(clean) test - $(MAKE) $(clean) tools/kconfig + $(Q)$(MAKE) $(clean)=3Dtools + $(Q)$(MAKE) $(clean)=3Dinclude + $(Q)$(MAKE) $(clean)=3Dcommon + $(Q)$(MAKE) $(clean)=3Ddrivers + $(Q)$(MAKE) $(clean)=3Dlib + $(Q)$(MAKE) $(clean)=3Dxsm + $(Q)$(MAKE) $(clean)=3Dcrypto + $(Q)$(MAKE) $(clean)=3Darch/arm + $(Q)$(MAKE) $(clean)=3Darch/riscv + $(Q)$(MAKE) $(clean)=3Darch/x86 + $(Q)$(MAKE) $(clean)=3Dtest + $(Q)$(MAKE) $(clean)=3Dtools/kconfig find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \ -o -name ".*.o.tmp" -o -name "*~" -o -name "core" \ -o -name '*.lex.c' -o -name '*.tab.[ch]' \ diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 3ce5f1674f6f..cecfaf4f3c0f 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -116,7 +116,4 @@ $(obj)/xen.lds: $(src)/xen.lds.S FORCE =20 $(obj)/dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) =20 -.PHONY: clean -clean:: - rm -f $(obj)/xen.lds - rm -f $(BASEDIR)/.xen-syms.[0-9]* +clean-files :=3D $(objtree)/.xen-syms.[0-9]* diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 0b0ef6205bc1..243ca17f701e 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -77,6 +77,9 @@ obj-$(CONFIG_COMPAT) +=3D x86_64/platform_hypercall.o obj-y +=3D sysctl.o endif =20 +# Allows "clean" to descend into boot/ +subdir- +=3D boot + extra-y +=3D asm-macros.i extra-y +=3D xen.lds =20 @@ -190,8 +193,8 @@ note_file :=3D endif note_file_option ?=3D $(note_file) =20 +extra-$(XEN_BUILD_PE) +=3D efi.lds ifeq ($(XEN_BUILD_PE),y) -extra-y +=3D efi.lds $(TARGET).efi: $(BASEDIR)/prelink.o $(note_file) $(obj)/efi.lds $(obj)/efi= /relocs-dummy.o $(obj)/efi/mkreloc ifeq ($(CONFIG_DEBUG_INFO),y) $(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug inf= o from $(@F)" @@ -256,10 +259,11 @@ $(obj)/boot/mkelf32: $(src)/boot/mkelf32.c $(obj)/efi/mkreloc: $(src)/efi/mkreloc.c $(HOSTCC) $(HOSTCFLAGS) -g -o $@ $< =20 -.PHONY: clean -clean:: - rm -f *.lds boot/mkelf32 - rm -f asm-macros.i $(BASEDIR)/arch/x86/include/asm/asm-macros.* - rm -f $(BASEDIR)/.xen-syms.[0-9]* $(BASEDIR)/.xen.elf32 - rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi efi/mkreloc - rm -f boot/cmdline.S boot/reloc.S boot/*.lnk boot/*.bin +clean-files :=3D \ + boot/mkelf32 \ + include/asm/asm-macros.* \ + $(objtree)/.xen-syms.[0-9]* \ + $(objtree)/.xen.elf32 \ + $(objtree)/.xen.efi.[0-9]* \ + efi/*.efi \ + efi/mkreloc diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index ba732e4a88c3..1ac8cb435e0e 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -21,3 +21,5 @@ $(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) $(src)= /build32.lds =20 $(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) $(src)/build32.lds $(MAKE) -f $(abs_srctree)/$(src)/build32.mk -C $(obj) $(@F) RELOC_DEPS=3D= "$(RELOC_DEPS)" + +clean-files :=3D cmdline.S reloc.S *.lnk *.bin diff --git a/xen/common/Makefile b/xen/common/Makefile index ca839118e4d1..dc8d3a13f5b8 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -84,5 +84,4 @@ $(obj)/config_data.S: $(BASEDIR)/tools/binfile FORCE $(call if_changed,binfile,$(obj)/config.gz xen_config_data) targets +=3D config_data.S =20 -clean:: - rm -f config_data.S config.gz 2>/dev/null +clean-files :=3D config.gz diff --git a/xen/include/Makefile b/xen/include/Makefile index cd40d5b4c923..a3c2511f5f60 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -131,6 +131,4 @@ lib-x86-all: all: lib-x86-all endif =20 -clean:: - rm -rf compat config generated headers*.chk - rm -f $(BASEDIR)/include/xen/lib/x86/cpuid-autogen.h +clean-files :=3D compat config generated headers*.chk xen/lib/x86/cpuid-au= togen.h diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 79b42e1252d6..d56bf7d4a452 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -99,8 +99,8 @@ build :=3D -f $(srctree)/Rules.mk obj =20 # Shorthand for $(MAKE) clean # Usage: -# $(MAKE) $(clean) dir -clean :=3D -f $(BASEDIR)/scripts/Makefile.clean clean -C +# $(Q)$(MAKE) $(clean)=3Ddir +clean :=3D -f $(srctree)/scripts/Makefile.clean obj =20 # echo command. # Short version is used, if $(quiet) equals `quiet_', otherwise full one. diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index c2689d4af5fa..4eed31974509 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -3,7 +3,6 @@ # Cleaning up # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -obj :=3D . src :=3D $(obj) =20 clean:: @@ -17,11 +16,20 @@ include $(src)/Makefile subdir-all :=3D $(subdir-y) $(subdir-n) $(subdir-) \ $(patsubst %/,%, $(filter %/, $(obj-y) $(obj-n) $(obj-))) =20 +subdir-all :=3D $(addprefix $(obj)/,$(subdir-all)) + __clean-files :=3D \ $(clean-files) $(hostprogs-y) $(hostprogs-) \ + $(extra-y) $(extra-) $(targets) \ $(hostprogs-always-y) $(hostprogs-always-) =20 -__clean-files :=3D $(wildcard $(__clean-files)) +# clean-files is given relative to the current directory, unless it +# starts with $(objtree)/ (which means "./", so do not add "./" unless +# you want to delete a file from the toplevel object directory). + +__clean-files :=3D $(wildcard \ + $(addprefix $(obj)/, $(filter-out /% $(objtree)/%, $(__clean-files)))= \ + $(filter /% $(objtree)/%, $(__clean-files))) =20 .PHONY: clean clean:: $(subdir-all) @@ -35,6 +43,6 @@ endif =20 PHONY +=3D $(subdir-all) $(subdir-all): - $(MAKE) $(clean) $@ + $(Q)$(MAKE) $(clean)=3D$@ =20 .PHONY: $(PHONY) diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index adb484dc5d2c..e6fee84b69da 100644 --- a/xen/test/livepatch/Makefile +++ b/xen/test/livepatch/Makefile @@ -160,6 +160,4 @@ install: $(addprefix $(obj)/,$(LIVEPATCHES)) uninstall: cd $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) && rm -f $(LIVEPATCHES) =20 -.PHONY: clean -clean:: - rm -f *.livepatch config.h expect_config.h +clean-files :=3D config.h expect_config.h diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 832f65274cc0..4ac6fb8778ae 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -49,6 +49,4 @@ $(obj)/policy.bin: FORCE FLASK_BUILD_DIR=3D$(FLASK_BUILD_DIR) POLICY_FILENAME=3D$(POLICY_S= RC) cmp -s $(POLICY_SRC) $@ || cp $(POLICY_SRC) $@ =20 -.PHONY: clean -clean:: - rm -f $(ALL_H_FILES) policy.* $(POLICY_SRC) flask-policy.S +clean-files :=3D policy.* $(POLICY_SRC) --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848115; cv=none; d=zohomail.com; s=zohoarc; b=XyiP/D6cYi4f6sZhAaWiDA37DrR/f4kyUR9aBAEsrgIVAa7BeJM6ZtvIxyMKuxZDTqOEkeFxNSlAGhj2sruS2XXKoU5r0IrZXLuexpeD2qinW98qFiGc60NfegNtew3eRSdFAobIU2lJhKv/LbvztngacLnGHLU1pqegKuSPhkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848115; 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=gcN2IUavdJkh5qtSvWqGGf6qtdYzRcsmbc3A4oFgrWA=; b=COesfU3BXlYHZl5U4pdAHwtgiQgI6W+POBxIaa+ef1GfCt+xI8+Qi9Q6MCmLt0+XGPkeHNH6AkqnZXXH7QntDcw4yKD5BXHoRACAN+D/sI02p0kwVoC9SuTzbrYNhXJdk9TpHZfGcaxmDuNmmqesLUXwq8Fh/peodma85YYJJ0Q= 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 1637848115106374.54931567475967; Thu, 25 Nov 2021 05:48:35 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231331.400447 (Exim 4.92) (envelope-from ) id 1mqF6q-00072X-Vk; Thu, 25 Nov 2021 13:48:20 +0000 Received: by outflank-mailman (output) from mailman id 231331.400447; Thu, 25 Nov 2021 13:48:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6q-00070d-7O; Thu, 25 Nov 2021 13:48:20 +0000 Received: by outflank-mailman (input) for mailman id 231331; Thu, 25 Nov 2021 13:48:17 +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 1mqF0B-0007NX-6U for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:27 +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 62a71412-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:26 +0100 (CET) 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: 62a71412-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847686; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eADHJIy3aZSo8eo5bCByBjcWS5FHvbhrDV1qn8IKzhs=; b=J1bP2hX3ue7UgV0C/HmGiR94NGGRsndn+5LaN/83v8dJgg5fK2PVZbf1 VYnqyP5gac6zYPQCsLSkBH2jx3/U5nFaPgjcYFyfyjLjQXpypVOuTkYHX vE00ea8TW+R0TjsrIjvI+Oo3O9IsWHmdZ/z0tFUUh0HL6K3kZcTXqFr9v 0=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: lnAmMJErsnuFCXmexossqfkUNChbCwu0blTDBVlvg4AIVZjyogaKaKYxje0FDWSnltqrk59x8d PkFXViq5ll6jvgib4yc+kKm+LurRLvezodMD2dEMecCeD6rod29eTWBp+Y198dPe7nPJbiBNWu nHGwhVfB2WAQ1MOHAOeVRiXMKW/Ai0T/4DU8dLXHRaBhbi4U2N9TAnZxZwJOUPHSAG5EqnhNWp 3tcvUhHqPywnbRzMAxWocwg95TiKgcJkoh4njxeTfW1LGuCMeWLILrzM0IKNJ6oY4OLGJdJxlp lZ8U0lL6X/IzEJfePqMhMueo X-SBRS: 5.1 X-MesageID: 58135476 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:8xkN06CHutmy3hVW/xDkw5YqxClBgxIJ4kV8jS/XYbTApD0mhTRSz GIfUGzTPamJZzb2Lt1+ao6+9U5QuZ/dxoU2QQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMo/u1Si6FatANl1ElvU2zbue6WLGs1hxZH1c+EX540087wYbVv6Yz6TSHK1LV0 T/Ni5W31G+Ng1aY5UpNtspvADs21BjDkGtwUm4WPJinj3eH/5UhN7oNJLnZEpfNatI88thW5 Qr05OrREmvxp3/BAz4++1rxWhVirrX6ZWBihpfKMkQLb9crSiEai84G2PQghUh/kjvZutpX1 +xxi7PqWV02N5Ock80AXEwNe81+FfUuFL7vJHG+tYqYzlHccmuqyPJrZK00FdRGoKAtWzgIr KFGbmBWBvyAr7veLLaTQ+9whsMlPY/zMZkWoH1IxjDFF/c2B5vERs0m4PcFjG5r25wRQ54yY eIAW2BiV0//eSZlYHwlKZdlsvempSPWJmgwRFW9+vNsvjm7IBZK+KfpGMrYfJqNX8o9tkSSq 3/C/m/5KgoHL9HZwj2Amlq8i+mKkS7lVYY6ELyj6uUskFCV3nYUChAdSR28u/bRt6Klc4sBc QpOoHNo9PVsshzwJjXgY/GmiGeK7jsWfcVpL9MVshHX1aPqsw2wG2dRG1atd+canMMxQDUr0 HqAkNXoGSFjvdWpdJ6NyluHhWjsYHZIdAfucQdBFFJYuIe7/OnfmzqWFo47eJNZmOEZDt0ZL 9qiiCElz4segscQv0lQ1QCW2mn8znQlo+Nc2+k2Yo5Hxl8mDGJGT9bxgbQ+0RqnBNzEJmRtR FBex6CjABkmVPlhbhClTuQXB62O7P2YKjDailMHN8B/rGvypC/zLdEKvmAWyKJV3iEsI2GBX aMukVkJuM870IWCMcebnL5d++x1lPO9RLwJp9jfb8ZUY4gZSeN01HoGWKJk5Ei0yBJEufhmY f+zKJ/wZV5HWfUP5GfnHI81jO50rh3SMEuOHPgXOTz8iuHADJNUIJ9YWGazghcRsPnZ/V6Lq okHbKNnCXx3CYXDX8UeyqZLRXhiEJTxLcqeRxV/erHRLwx4NnsmDvONk7otd5Y8x/Zel/vS/ 2H7UUhdkQKtiXrCIASMS3ZidLKwAsov8SNlZXQhbQSyxnwuQYez96NDJZE5SqYqqb54xvluQ vhbJ8jZWqZTSi7K8ig2ZIXmqNAwbwyigA+DZnL3YDU2c5N6aRbO/9voIlnm+CUUV3Llvsoiu bywkAjcRMNbFQhlCc/XbtOpzk+w4idByL4jAROQL4AKKkv28YVsJyjgtdMNIpkBeUfZ2z+X9 weKGhNE9+PDlJA4rYvSjqeeoob3T+YnRhhGH3PW5KqdPDXB+jbx2pdJVeuFcGyPVG7w/6n+N +xZw+ulba8ClVdO9YF9D6xq3eQ14N62/+1WyQFtHXPqaVW3C+w/finajJcX7qAdlKVEvQaWW 16U/ogIMLqED8rpDVoNKVd3de+Ez/wVxmHf4PldzJ8WP8OrEG5riXlvAiQ= IronPort-HdrOrdr: A9a23:4vPBmq4WwIMT8y7T3wPXwPDXdLJyesId70hD6qhwISY6TiX+rb HJoB17726NtN9/YhEdcLy7VJVoBEmskKKdgrNhWotKPjOW21dARbsKheCJrgEIWReOktK1vZ 0QCpSWY+eQMbEVt6nHCXGDYrQd/OU= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58135476" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v8 24/47] build: use main rune to build host binary x86's mkelf32 and mkreloc Date: Thu, 25 Nov 2021 13:39:43 +0000 Message-ID: <20211125134006.1076646-25-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848116755100003 Content-Type: text/plain; charset="utf-8" Also, remove the HOSTCFLAGS "-g" from "mkreloc" command line. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v8: - acked - remove the cflags "-g" from "mkreloc" xen/arch/x86/Makefile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 243ca17f701e..e8151bf4b111 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -83,6 +83,9 @@ subdir- +=3D boot extra-y +=3D asm-macros.i extra-y +=3D xen.lds =20 +hostprogs-y +=3D boot/mkelf32 +hostprogs-y +=3D efi/mkreloc + # Allows usercopy.c to include itself $(obj)/usercopy.o: CFLAGS-y +=3D -iquote . =20 @@ -253,17 +256,9 @@ $(obj)/efi.lds: AFLAGS-y +=3D -DEFI $(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE $(call if_changed_dep,cpp_lds_S) =20 -$(obj)/boot/mkelf32: $(src)/boot/mkelf32.c - $(HOSTCC) $(HOSTCFLAGS) -o $@ $< - -$(obj)/efi/mkreloc: $(src)/efi/mkreloc.c - $(HOSTCC) $(HOSTCFLAGS) -g -o $@ $< - clean-files :=3D \ - boot/mkelf32 \ include/asm/asm-macros.* \ $(objtree)/.xen-syms.[0-9]* \ $(objtree)/.xen.elf32 \ $(objtree)/.xen.efi.[0-9]* \ - efi/*.efi \ - efi/mkreloc + efi/*.efi --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848053; cv=none; d=zohomail.com; s=zohoarc; b=No6AHixpLhX8fu1h63/ytC1tl3x8kv8pQ+nvUTmNR3uaDuc4Z5mLAwOkI0MtonJTv0yj0KTH2ZVCVtM+oKoGBQULZ0/2eL8Aodeb/OTj+GuKes7FQWuUpEep8VARpTuYlgpZcPNIYFS9ZKsPI3+T/VS/l83rXTSKvJD3Sh8bn/8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848053; 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=HoN2Fs8Fs/HDdWtr5uuEJg59mjgUIRD4GY+2T9tMdNA=; b=UrCM6decKYDeEAAutvnl8z/S87HTOscdrTuQO4DjZoMxsNqmpuK8PcOfMWQsINuKzB1TfXfQPFT1soWVIorS3cR32v/cOInyEonJ+dYF86eFnumPvRK/XFgeAXtc60Xw6Txje8FqH7597rWkVT1PR7xK+hGiMneHoWDKtpgBiJE= 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 1637848053120587.2917465189068; Thu, 25 Nov 2021 05:47:33 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231263.400155 (Exim 4.92) (envelope-from ) id 1mqF5q-00010R-NA; Thu, 25 Nov 2021 13:47:18 +0000 Received: by outflank-mailman (output) from mailman id 231263.400155; Thu, 25 Nov 2021 13:47:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5q-0000zR-AY; Thu, 25 Nov 2021 13:47:18 +0000 Received: by outflank-mailman (input) for mailman id 231263; Thu, 25 Nov 2021 13:47:16 +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 1mqF0C-0007NX-8R for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:28 +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 61f79501-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:27 +0100 (CET) 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: 61f79501-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847687; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bOo1Z/T3w/mQYlFp7E4qcB5DbSAxG5uo05MNRdVl4wM=; b=WmeMt6eol6eXiJiDQHaBeQt+BeUhVjf6XdQmY1J5eqAzvPsjDKl2RmW9 fBfF96meiQC2+YtJH3JgiU8LOK6SugiFBBxSaDaQhi77B/lYOpVJISLjt +s5pmt3qAl9SosUcebiIBx5cJjErwRXCCE0trLZBiiPz2KetVd5saVsOY k=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: +AdAtrej9VQcLCNpbiZ2x08WtITeZXq32uP157ac+kl7ZTVAVH2dOY2W1eXGn48ZGsqdipKmEE g7jzeit6lnDIjV8o7ZQyrd7+W3sccuQy65coc+yXa/y0XtLgLB3XThh6jirkmAhbMXo6ZE4yRM 2G5lFJNbpycYnGhftFNwl1cjiQxxahMVOzqR5o/hjGoyLgrCE4RCOH3gRGGPFaiwKIji8G9cFA 3odwANGryscHjCRKm2/0QqB97rlFUCkU2ZLj/nNGndWbMst4sNJFkfXamG7APEKCGu86N/tPOM bnUU+YAQ3K24FPP8rX0UvgWR X-SBRS: 5.1 X-MesageID: 58135478 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:Gydnl65YohovGKVaAfNshwxRtMXAchMFZxGqfqrLsTDasY5as4F+v mcXXWiCbKrcazD8eN1yYdzk9kwGusSEyIdqTAo+r31hHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuV3zyIQUBUjclkfJKlYAL/En03FVAMpBsJ00o5wrdg2NMw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Zk NZPl5GpFgMSBe7TheoHcClnNHxPBPgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALJc/3PIQZqzd4wCvQF/oOSpHfWaTao9Rf2V/cg+gTTa+FO pZGOVKDajzNZRZmJnMeUa5lhbm6olfaWBtDqGy88P9fD2/7k1UqjemF3MDuUt6XQcRYmG6Iq 2SA+H72ajkBL8CWwzeB9nOqh8fMkD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A9a23:i+1JrK7viDgtcXJUdQPXwPDXdLJyesId70hD6qhwISY6TiX+rb HJoB17726NtN9/YhEdcLy7VJVoBEmskKKdgrNhWotKPjOW21dARbsKheCJrgEIWReOktK1vZ 0QCpSWY+eQMbEVt6nHCXGDYrQd/OU= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58135478" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 25/47] build: rework coverage and ubsan CFLAGS handling Date: Thu, 25 Nov 2021 13:39:44 +0000 Message-ID: <20211125134006.1076646-26-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848055297100001 Content-Type: text/plain; charset="utf-8" When assigning a value a target-specific variable, that also affect prerequisite of the target. This is mostly fine, but there is one case where we will not want the COV_FLAGS added to the CFLAGS. In arch/x86/boot, we have "head.o" with "cmdline.S" as prerequisite and ultimately "cmdline.o", we don't want COV_FLAGS to that last one. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v8: - reorder target-specific assignments - fix typo in comment - reviewed xen/Rules.mk | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 9eb3093f43fb..d6eabd3415b5 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -126,19 +126,31 @@ targets +=3D $(targets-for-builtin) =20 $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS-y +=3D -DINIT_= SECTIONS_ONLY =20 +non-init-objects =3D $(filter-out %.init.o, $(obj-y) $(obj-bin-y) $(extra-= y)) + ifeq ($(CONFIG_COVERAGE),y) ifeq ($(CONFIG_CC_IS_CLANG),y) COV_FLAGS :=3D -fprofile-instr-generate -fcoverage-mapping else COV_FLAGS :=3D -fprofile-arcs -ftest-coverage endif -$(filter-out %.init.o $(nocov-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS= -y +=3D $(COV_FLAGS) + +# Reset COV_FLAGS in cases where an objects has another one as prerequisite +$(nocov-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(extra-y)): \ + COV_FLAGS :=3D + +$(non-init-objects): _c_flags +=3D $(COV_FLAGS) endif =20 ifeq ($(CONFIG_UBSAN),y) # Any -fno-sanitize=3D options need to come after any -fsanitize=3D options -$(filter-out %.init.o $(noubsan-y),$(obj-y) $(obj-bin-y) $(extra-y)): \ -CFLAGS-y +=3D $(filter-out -fno-%,$(CFLAGS_UBSAN)) $(filter -fno-%,$(CFLAG= S_UBSAN)) +UBSAN_FLAGS :=3D $(filter-out -fno-%,$(CFLAGS_UBSAN)) $(filter -fno-%,$(CF= LAGS_UBSAN)) + +# Reset UBSAN_FLAGS in cases where an objects has another one as prerequis= ite +$(noubsan-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(extra-y)): \ + UBSAN_FLAGS :=3D + +$(non-init-objects): _c_flags +=3D $(UBSAN_FLAGS) endif =20 ifeq ($(CONFIG_LTO),y) @@ -167,6 +179,9 @@ a_flags =3D -MMD -MP -MF $(depfile) $(XEN_AFLAGS) =20 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk =20 +c_flags +=3D $(_c_flags) +a_flags +=3D $(_c_flags) + c_flags +=3D $(CFLAGS-y) a_flags +=3D $(CFLAGS-y) $(AFLAGS-y) =20 --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848046; cv=none; d=zohomail.com; s=zohoarc; b=YcTp77jxVzDbq6X7VED3fHB4VDlaygJVt/D1MHG5+9pIQU3NWlQ0FsNS2fnyRRo1hxBPvrRcBcB/eV7E5bg8Uez9seOPZCk4QK2IIyowv1g97+CU8c1a2AvmmgPBpJaJHBQsqsfGYwfP82QU5Ri4rwVDA3b1suwZpNWz6o0Bokc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848046; 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=4JRQLkQAzWNEc0HKLlgzDh1PgGwfVPDdUlvGsMQk8q4=; b=J7eqQkiX7r5SQVKxAdWNNMQliok02EqqsqCrOeK10SS9+U8kGmXTz3ClBZ/6FbZ8egXLxfFnnFdLH3rAmyiniIUoxgMOIPqJ5+guW1xLgfLj89G3Fum0r6dM0tW24enqcIReLGthkkYrB25opKOB9yT3TWUsgG9oq94sUZc3Gs4= 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 1637848046791183.9389671242152; Thu, 25 Nov 2021 05:47:26 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231248.400134 (Exim 4.92) (envelope-from ) id 1mqF5g-00085W-1s; Thu, 25 Nov 2021 13:47:08 +0000 Received: by outflank-mailman (output) from mailman id 231248.400134; Thu, 25 Nov 2021 13:47:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5f-00085I-U4; Thu, 25 Nov 2021 13:47:07 +0000 Received: by outflank-mailman (input) for mailman id 231248; Thu, 25 Nov 2021 13:47:06 +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 1mqF0H-0007NX-3W for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:33 +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 652e3202-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:31 +0100 (CET) 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: 652e3202-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847691; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2QMfXUKxvTthImIF1JtX1MFJNxNq82iTmR07HivbeVE=; b=Te69j4Nv9oGbtWkWh6Up7Il7MAaEPvCAnFO1HI90uqa1MW61G9vU5t0L gjUuYyd2n6HajR5Y/I99zOF+7SNgcpQWVG6yag9yaQmhWUHgEGIjnj1K2 eGvdqjQ0D0WRda7o/L7QyMoGxfPeeebpnJvI7yRfu+I5qyPxIgm5hTjxb c=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: NIY5SJKOzpsCsb0/5h/oJKAbuLW4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5OUtQ4exoV5PhfZqxz/JICMwqTNKftWrdyQyVxeNZnOjfKlTbckWUnINgPO VbAsxD4bXLfCFHZK3BgTVQfexO/DD+ytHLudvj X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58576697" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v8 26/47] build,x86: remove the need for build32.mk Date: Thu, 25 Nov 2021 13:39:45 +0000 Message-ID: <20211125134006.1076646-27-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848048195100001 Content-Type: text/plain; charset="utf-8" Rework "arch/x86/boot/Makefile" to allow it to build both file "cmdline.S" and "reloc.S" without "build32.mk". These will now use the main rules for "%.o: %.c", and thus generate a dependency file. (We will not need to track the dependency manually anymore.) But for that, we need to override the main CFLAGS to do a 32bit build. We introduce XEN_COMMON_CFLAGS which can be reused in boot/Makefile, and avoid the need to reparse Config.mk with a different value for XEN_TARGET_ARCH. From this new $(XEN_COMMON_CFLAGS), we only need to change -m64 to have the 32bit flags. Then those are applied only to "cmdline.o" and "reloc.o". Specifically apply the rule "%.S: %.bin" to both cmdline.S and reloc.S to avoid make trying to regenerate other %.S files with it. There is no change expected to the resulting "cmdline.S" and "reloc.S", only the *.o file changes as their symbol for FILE goes from "cmdline.c" to "arch/x86//cmdline.c". (No idea why "boot" is missing from the string.) (I've only check with GCC, not clang.) Signed-off-by: Anthony PERARD --- Notes: v8: - avoid the need to list CFLAGS from Config.mk a second time by introducing XEN_COMMON_CFLAGS, and using it in boot/ - improve LDFLAGS_DIRECT, by just substitute x64 to i368 from x86 LDFLAGS_DIRECT. And thus avoid copying the logic from Config.mk. xen/Makefile | 4 +++ xen/arch/x86/boot/Makefile | 52 +++++++++++++++++++++++++----------- xen/arch/x86/boot/build32.mk | 40 --------------------------- 3 files changed, 40 insertions(+), 56 deletions(-) delete mode 100644 xen/arch/x86/boot/build32.mk diff --git a/xen/Makefile b/xen/Makefile index deae319c8a5a..90e8191f51ce 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -171,6 +171,10 @@ export LEX =3D $(if $(FLEX),$(FLEX),flex) # Default file for 'make defconfig'. export KBUILD_DEFCONFIG :=3D $(ARCH)_defconfig =20 +# Copy CFLAGS generated by "Config.mk" so they can be reused later without +# reparsing Config.mk by e.g. arch/x86/boot/. +export XEN_COMMON_CFLAGS :=3D $(CFLAGS) + # CLANG_FLAGS needs to be calculated before calling Kconfig ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) CLANG_FLAGS :=3D diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 1ac8cb435e0e..5395aae5d57e 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -1,25 +1,45 @@ obj-bin-y +=3D head.o +head-objs :=3D cmdline.S reloc.S =20 -DEFS_H_DEPS =3D $(abs_srctree)/$(src)/defs.h $(abs_srctree)/include/xen/st= dbool.h +nocov-y +=3D $(head-objs:.S=3D.o) +noubsan-y +=3D $(head-objs:.S=3D.o) +targets +=3D $(head-objs:.S=3D.o) =20 -CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(abs_srctree)/$(src)/video.h \ - $(BASEDIR)/include/xen/kconfig.h \ - $(BASEDIR)/include/generated/autoconf.h +head-objs :=3D $(addprefix $(obj)/, $(head-objs)) =20 -RELOC_DEPS =3D $(DEFS_H_DEPS) \ - $(BASEDIR)/include/generated/autoconf.h \ - $(BASEDIR)/include/xen/kconfig.h \ - $(BASEDIR)/include/xen/multiboot.h \ - $(BASEDIR)/include/xen/multiboot2.h \ - $(BASEDIR)/include/xen/const.h \ - $(BASEDIR)/include/public/arch-x86/hvm/start_info.h +$(obj)/head.o: $(head-objs) =20 -$(obj)/head.o: $(obj)/cmdline.S $(obj)/reloc.S +$(head-objs:.S=3D.lnk): LDFLAGS_DIRECT :=3D $(subst x86_64,i386,$(LDFLAGS_= DIRECT)) =20 -$(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) $(src)/build32.lds - $(MAKE) -f $(abs_srctree)/$(src)/build32.mk -C $(obj) $(@F) CMDLINE_DEPS= =3D"$(CMDLINE_DEPS)" +CFLAGS_x86_32 :=3D $(subst -m64,-m32 -march=3Di686,$(XEN_COMMON_CFLAGS)) +$(call cc-options-add,CFLAGS_x86_32,CC,$(EMBEDDED_EXTRA_CFLAGS)) +CFLAGS_x86_32 +=3D -Werror -fno-builtin -g0 -msoft-float +CFLAGS_x86_32 +=3D -I$(srctree)/include =20 -$(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) $(src)/build32.lds - $(MAKE) -f $(abs_srctree)/$(src)/build32.mk -C $(obj) $(@F) RELOC_DEPS=3D= "$(RELOC_DEPS)" +# override for 32bit binaries +$(head-objs:.S=3D.o): CFLAGS-stack-boundary :=3D +$(head-objs:.S=3D.o): XEN_CFLAGS :=3D $(CFLAGS_x86_32) -fpic + +$(head-objs): %.S: %.bin + (od -v -t x $< | tr -s ' ' | awk 'NR > 1 {print s} {s=3D$$0}' | \ + sed 's/ /,0x/g' | sed 's/,0x$$//' | sed 's/^[0-9]*,/ .long /') >$@ + +# Drop .got.plt during conversion to plain binary format. +# Please check build32.lds for more details. +%.bin: %.lnk + $(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | \ + while read idx name sz rest; do \ + case "$$name" in \ + .got.plt) \ + test $$sz !=3D 0c || continue; \ + echo "Error: non-empty $$name: 0x$$sz" >&2; \ + exit $$(expr $$idx + 1);; \ + esac; \ + done + $(OBJCOPY) -O binary -R .got.plt $< $@ + + +%.lnk: %.o $(src)/build32.lds + $(LD) $(LDFLAGS_DIRECT) -N -T $(filter %.lds,$^) -o $@ $< =20 clean-files :=3D cmdline.S reloc.S *.lnk *.bin diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk deleted file mode 100644 index e90680cd9f52..000000000000 --- a/xen/arch/x86/boot/build32.mk +++ /dev/null @@ -1,40 +0,0 @@ -override XEN_TARGET_ARCH=3Dx86_32 -CFLAGS =3D -include $(XEN_ROOT)/Config.mk - -$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) - -CFLAGS +=3D -Werror -fno-builtin -g0 -msoft-float -CFLAGS +=3D -I$(BASEDIR)/include -CFLAGS :=3D $(filter-out -flto,$(CFLAGS))=20 - -# NB. awk invocation is a portable alternative to 'head -n -1' -%.S: %.bin - (od -v -t x $< | tr -s ' ' | awk 'NR > 1 {print s} {s=3D$$0}' | \ - sed 's/ /,0x/g' | sed 's/,0x$$//' | sed 's/^[0-9]*,/ .long /') >$@ - -# Drop .got.plt during conversion to plain binary format. -# Please check build32.lds for more details. -%.bin: %.lnk - $(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | \ - while read idx name sz rest; do \ - case "$$name" in \ - .got.plt) \ - test $$sz !=3D 0c || continue; \ - echo "Error: non-empty $$name: 0x$$sz" >&2; \ - exit $$(expr $$idx + 1);; \ - esac; \ - done - $(OBJCOPY) -O binary -R .got.plt $< $@ - -%.lnk: %.o build32.lds - $(LD) $(LDFLAGS_DIRECT) -N -T build32.lds -o $@ $< - -%.o: %.c - $(CC) $(CFLAGS) -c -fpic $< -o $@ - -cmdline.o: cmdline.c $(CMDLINE_DEPS) - -reloc.o: reloc.c $(RELOC_DEPS) - -.PRECIOUS: %.bin %.lnk --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848078; cv=none; d=zohomail.com; s=zohoarc; b=kK3g32mk9uXIAIsps7DjH823HsTzGtQjfSS4EU5876Txu81LqKihfOYnMiSv4ZVQ+jiMOUbXPL+YoAx5g2zw94PBR4BJA3zYZhzoOtHVjSJ4bp49MQEiqK7CK+Jdg/MvFZxVqu8yldjh9NKUsKrZaduK3Tn6sZ/CbhLcCUZhCd8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848078; 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=/sae+YMD278drYgm1CS5f0b47hgYTqh3S2JawAUtHkU=; b=erqOnEu6Vihqr3+uSnVnSYUGJVksmyBsPV5i+a7XAcd2UhQ5UBxeZzjlIx0MNvDMAIVRvBMn1B/6eo+zlxq4MEif5EbHyNZjztXO+7DoEUIiFpQ2hE3gakEUd5dh2qAP6NlQwH6KBUE4gSpOT41fsmGscGxILInBy0zzRCwBIs4= 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 1637848078009945.0334157611615; Thu, 25 Nov 2021 05:47:58 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231297.400282 (Exim 4.92) (envelope-from ) id 1mqF6E-0006fd-NH; Thu, 25 Nov 2021 13:47:42 +0000 Received: by outflank-mailman (output) from mailman id 231297.400282; Thu, 25 Nov 2021 13:47: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 1mqF6E-0006dp-ET; Thu, 25 Nov 2021 13:47:42 +0000 Received: by outflank-mailman (input) for mailman id 231297; Thu, 25 Nov 2021 13:47:40 +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 1mqF0I-0007NX-8u for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:34 +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 66c97b81-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:33 +0100 (CET) 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: 66c97b81-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847693; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=W9kLV8awBaqF9dybV3WIA0DVErlqsPPM8G6KoE90GX4=; b=B7u1uvrtUsuQn/Olb+NZaa5u8OIRxxTpYOCzXog+peH9mT7lv3amTZAX s84sV6CfFv4EqCox3gc6V+SyMI6pfC4LD0fjYtG/4UDsQ1zwCHyCtd5la Tn2119EGjUEYrNB7Eu+FfS5w/KTzTFAlou1bgcl/D75BhZuBAkouSxSRR Y=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 2AtnMImGH8SE5RsQYLyIPQrcbVa0haZAFKxzaTuB54LjHbjyaXQAKsX/+6hq+wdDnSxAn0uf3I WonahPf+b+KuZtcfXlwvPJwzM2Z6iEWghsksqcswrOibl45VUWRs2chcaWtTi46HdXQIeIgL7K 0UUr0105JH8vC1G7K+9/BUQBBqSoo0nqYtbStTNEfvVc7P6r1mSg5Q7ISi8B4SlAiyo5tpE7YV TSPeO2weMXlKyEUBQhU+UBzmP3VwFqZygDEaNdSDmvcsBO+KNAK1hp4QHf7WAsvxZdDHYky1Lq BLlI1BvCPmAHDheey55/9hjA X-SBRS: 5.1 X-MesageID: 58576698 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:edXt/azUmEmlv5R6z556t+ecwSrEfRIJ4+MujC+fZmUNrF6WrkUPm 2NJDWqAb/+NYTT3eNhyOt7npx8PvpPXmtVrG1NkpSAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAuLeNYYH1500s6wrRk2tQAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt/9/z +pn6LG+cwM0BqLSv90nbUZlGggraMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uXzsIr 6ZBbmlQMFbT3Ipaw5riIgVors0lMMnsOpJZonx6xCvVJf0nXYrCU+PB4towMDIY25ATQqiAN ppxhTxHKzvEbxRQK2ouA4slusO5jCP0VxFdgQfAzUYwyzeKl1EguFT3C/LKfvSaSMMTmVyXz krd5HjwCBweMN2ZyBKG/2iqi+uJmjn0MKoYGaek7PdsjBuWz3YKFRwNfVKhp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QJIE6Em4adi/I6tPGLHe/bkuiBIs177t9O IronPort-HdrOrdr: A9a23:FOlTQ6ivXU3U8GWEG0Uw5+Bjg3BQXuIji2hC6mlwRA09TySZ// rBoB19726TtN9xYgBZpTnuAsm9qB/nmaKdpLNhWItKPzOW31dATrsSjrcKqgeIc0aVm9K1l5 0QF5SWYOeAdGSS5vya3ODXKbkdKaG8gcKVuds= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58576698" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , "Bertrand Marquis" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v8 27/47] build: grab common EFI source files in arch specific dir Date: Thu, 25 Nov 2021 13:39:46 +0000 Message-ID: <20211125134006.1076646-28-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848079123100003 Content-Type: text/plain; charset="utf-8" Rather than preparing the efi source file, we will make the symbolic link as needed from the build location. The `ln` command is run every time to allow to update the link in case the source tree change location. This patch also introduce "efi_common.mk" which allow to reuse the common make instructions without having to duplicate them into each arch. And now that we have a list of common source file, we can start to remove the links to the source files on clean. Signed-off-by: Anthony PERARD --- Notes: v8: - use symbolic link instead of making a copy of the source - introduce efi_common.mk - remove links to source file on clean - use -iquote for "efi.h" headers in common/efi xen/Makefile | 5 ----- xen/arch/arm/efi/Makefile | 4 ++-- xen/arch/x86/Makefile | 1 + xen/arch/x86/efi/Makefile | 5 +---- xen/common/efi/efi_common.mk | 12 ++++++++++++ 5 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 xen/common/efi/efi_common.mk diff --git a/xen/Makefile b/xen/Makefile index 90e8191f51ce..2a809d577fc3 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -447,11 +447,6 @@ $(TARGET).gz: $(TARGET) $(TARGET): FORCE $(Q)$(MAKE) $(build)=3Dtools $(Q)$(MAKE) $(build)=3D. include/xen/compile.h - [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch])= ; \ - do test -r arch/$(TARGET_ARCH)/efi/$$f || \ - ln -nsf ../../../common/efi/$$f arch/$(TARGET_ARCH)/efi/; \ - done; \ - true $(Q)$(MAKE) $(build)=3Dinclude all $(Q)$(MAKE) $(build)=3Darch/$(TARGET_ARCH) include $(Q)$(MAKE) $(build)=3D. arch/$(TARGET_ARCH)/include/asm/asm-offsets.h diff --git a/xen/arch/arm/efi/Makefile b/xen/arch/arm/efi/Makefile index 1b1ed06feddc..57616a17cb03 100644 --- a/xen/arch/arm/efi/Makefile +++ b/xen/arch/arm/efi/Makefile @@ -1,4 +1,4 @@ -CFLAGS-y +=3D -fshort-wchar +include $(srctree)/common/efi/efi_common.mk =20 -obj-y +=3D boot.init.o pe.init.o ebmalloc.o runtime.o +obj-y +=3D $(EFIOBJ-y) obj-$(CONFIG_ACPI) +=3D efi-dom0.init.o diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index e8151bf4b111..eabd8d3919a4 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -79,6 +79,7 @@ endif =20 # Allows "clean" to descend into boot/ subdir- +=3D boot +subdir- +=3D efi =20 extra-y +=3D asm-macros.i extra-y +=3D xen.lds diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile index ac815f02cb5e..81fda12a70ea 100644 --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -1,4 +1,4 @@ -CFLAGS-y +=3D -fshort-wchar +include $(srctree)/common/efi/efi_common.mk =20 quiet_cmd_objcopy_o_ihex =3D OBJCOPY $@ cmd_objcopy_o_ihex =3D $(OBJCOPY) -I ihex -O binary $< $@ @@ -8,9 +8,6 @@ $(obj)/%.o: $(src)/%.ihex FORCE =20 $(obj)/boot.init.o: $(obj)/buildid.o =20 -EFIOBJ-y :=3D boot.init.o pe.init.o ebmalloc.o runtime.o -EFIOBJ-$(CONFIG_COMPAT) +=3D compat.o - $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary= =3D4) $(addprefix $(obj)/,$(EFIOBJ-y)): CFLAGS-stack-boundary :=3D $(cflags-stac= k-boundary) =20 diff --git a/xen/common/efi/efi_common.mk b/xen/common/efi/efi_common.mk new file mode 100644 index 000000000000..d2845fd6b3c8 --- /dev/null +++ b/xen/common/efi/efi_common.mk @@ -0,0 +1,12 @@ +EFIOBJ-y :=3D boot.init.o pe.init.o ebmalloc.o runtime.o +EFIOBJ-$(CONFIG_COMPAT) +=3D compat.o + +CFLAGS-y +=3D -fshort-wchar +CFLAGS-y +=3D -iquote $(srctree)/common/efi + +$(obj)/%.c: $(abs_srctree)/common/efi/%.c FORCE + $(Q)ln -nfs $< $@ + +clean-files +=3D $(patsubst %.o,%.c, $(EFIOBJ-y:.init.o=3D.o) $(EFIOBJ-)) + +.PRECIOUS: $(obj)/%.c --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848103; cv=none; d=zohomail.com; s=zohoarc; b=ZIA3sZ50xJ78qWk6lLuqlc4FGBXQXcNyAvf3T1yWe0PhOAOXf/YBjwQbntGmv90FXfvY4F+qfxUSAMcjClTwLaH+SDxmYLbfpRxC5RkQ4D87Xsx0d9S1hm3pat46rdaYAeYzZE+OLr9E9Zazu9mHAfuAmdmF7EFBVtaa/3KEfgs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848103; 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=/NejykhOKkIvY90Q/utUj5oF5ZbTF/RZm8i5bLHt2tU=; b=OPDGenLumW+xRhlyxA6xU+/qLq0awLSnRR0BGxNrXE84zoqDRqXjnsL2tuhA62ADpUQWqa6Y7KWl9ga0TEJ5dUM7CZKiIQh/kxm4HCD6ipA5entSkFoSc01giIjfYZBXG/LiB+Hqx3Zx87Zl2SU/t2/IKxb+TSZaP4uPXHqcmhQ= 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 1637848103816287.4886513953061; Thu, 25 Nov 2021 05:48:23 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231318.400392 (Exim 4.92) (envelope-from ) id 1mqF6c-0003hm-Li; Thu, 25 Nov 2021 13:48:06 +0000 Received: by outflank-mailman (output) from mailman id 231318.400392; Thu, 25 Nov 2021 13:48: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 1mqF6b-0003cv-Md; Thu, 25 Nov 2021 13:48:05 +0000 Received: by outflank-mailman (input) for mailman id 231318; Thu, 25 Nov 2021 13:48: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 1mqF0M-0007NX-As for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:38 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 682b4b48-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:36 +0100 (CET) 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: 682b4b48-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847696; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0dwWPZpy0KkJ+4xdfvtRcrAAB0kbPpTPYuJAwuL/Dtw=; b=aMv9hvnMFTmRvaM98W4aNy5AwrpgL8cY81hA32lBSG0awbI3KAAk31Nf YrT6rQ7Eb3Ow9K3gbk6RQWF1iOqsq2yEsGTmN7X+ivQnqVvx3lKAc0ipG 7L8GdpZusOciyLJUlHqIjYbR4KJXv7tBPW/WnpDTVSjp/RKYx+VA8VTFs M=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: yA3hOxrap6m/MqP6PIvyqdPo+yEYS+YXrv8+M+u630gD3nh6wM/unVUC/IPppLFE2HrAb0Oo8l vlBwS69H0keRJujuK2AHHsKr1/BtkSEmapu0u5sC7/oKSMyZQyWvBydOMDpUTsp0ci1df7XCQn WvZTfyxrmoh/S3eb4EiTHTXWTI/X9DpF3TmU8yNXmzv4qXKqdIRqLS0ajSyY8Ea2MA0deuU9H4 E/IMTZZAcrwp6G/yscmv2QWILi6rN4xXaKkwlcevtQ4fW3QvVuw5K6rd/GmUdUQ0nOKqXwUXi9 FcZ/ORgK/kyCtslFjS/M7sZw X-SBRS: 5.1 X-MesageID: 58617683 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:LRHkIqCNuTeWvBVW/2rlw5YqxClBgxIJ4kV8jS/XYbTApDsq12dUn DcaCG2Ca/3bZTf3KtEgPN62pBkAvZLSnNNmQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMo/u1Si6FatANl1ElvU2zbue6WLGs1hxZH1c+EX540087wYbVv6Yz6TSHK1LV0 T/Ni5W31G+Ng1aY5UpNtspvADs21BjDkGtwUm4WPJinj3eH/5UhN7oNJLnZEpfNatI88thW5 Qr05OrREmvxp3/BAz4++1rxWhVirrX6ZWBihpfKMkQLb9crSiEai84G2PQghUh/2gunxY8g2 f9xlcKMElsWJYTIpPkaakwNe81+FfUuFL7vJHG+tYqYzlHccmuqyPJrZK00FdRGoKAtWzgIr KFGbmBWBvyAr7veLLaTQ+9whsMlPY/zMZkWoH1IxjDFF/c2B5vERs0m4PcFjGlp2Z4eRp4yY eICMiNSUkj/fCEVEVlGBckYxtmQnl7GJmgwRFW9+vNsvjm7IBZK+IbqNN3Za9mbX/J/l0yTp n/F12nhCxRcP9uaoRKa9lq8i+mJmjn0MKoRE7ui//Isn1yXxUQUEhQdUVb9qv684ma0VshDM UUS9mwrpLIr6U2wZtDnWluzp3vslgUHR9NaHuk+6QeM4qnZ+QCUAi4DVDEpQN05tucmSDoyz FiLktj1Qzt1v9W9WX+bs7uZsz62ESwUNnMZIz8JSxMf5Nvuq511iQjAJv5hDaq0g9vdCTz2h TeQo0AWhb8ekMoK3KWT5k3cjnSnoZ2hc+IuzlyJBCT/tFo/PdP7IdzzgbTG0RpeBNenYAPe7 Wkup+jA0LtSMoqkkBCQR9xYSdlF+M25GDHbhFduGbwo+DKs52Ov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an'208";a="58617683" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , "Bertrand Marquis" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Konrad Rzeszutek Wilk , "Ross Lagerwall" Subject: [XEN PATCH v8 28/47] build: replace $(BASEDIR) by $(objtree) Date: Thu, 25 Nov 2021 13:39:47 +0000 Message-ID: <20211125134006.1076646-29-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848105814100001 Content-Type: text/plain; charset="utf-8" We need to differentiate between source files and generated/built files. We will be replacing $(BASEDIR) by $(objtree) for files that are generated. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v8: - rebased xen/Rules.mk | 2 +- xen/arch/arm/Makefile | 10 +++++----- xen/arch/x86/Makefile | 28 ++++++++++++++-------------- xen/common/Makefile | 2 +- xen/test/livepatch/Makefile | 12 ++++++------ 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index d6eabd3415b5..cd00f006ee8f 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -12,7 +12,7 @@ src :=3D $(obj) PHONY :=3D __build __build: =20 --include $(BASEDIR)/include/config/auto.conf +-include $(objtree)/include/config/auto.conf =20 include $(XEN_ROOT)/Config.mk include $(BASEDIR)/scripts/Kbuild.include diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index cecfaf4f3c0f..ae7a2f907540 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -90,21 +90,21 @@ ifeq ($(CONFIG_ARM_64),y) ln -sf $(@F) $@.efi endif =20 -$(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds +$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ - $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 + $(objtree)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ - | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S + | $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S $(MAKE) $(build)=3D$(@D) $(@D)/.$(@F).0.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ - | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S + | $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S $(MAKE) $(build)=3D$(@D) $(@D)/.$(@F).1.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ - | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ + | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \ >$(@D)/$(@F).map rm -f $(@D)/.$(@F).[0-9]* =20 diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index eabd8d3919a4..5fb7f1408768 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -94,8 +94,8 @@ ifneq ($(CONFIG_HVM),y) $(obj)/x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label endif =20 -efi-y :=3D $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \ - -O $(BASEDIR)/include/xen/compile.h ]; then \ +efi-y :=3D $(shell if [ ! -r $(objtree)/include/xen/compile.h -o \ + -O $(objtree)/include/xen/compile.h ]; then \ echo '$(TARGET).efi'; fi) \ $(space) efi-$(CONFIG_PV_SHIM_EXCLUSIVE) :=3D @@ -133,23 +133,23 @@ $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32 =20 CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI =20 -$(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds +$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ - $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 + $(objtree)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ - | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort \ + | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \ >$(@D)/.$(@F).0.S $(MAKE) $(build)=3D$(@D) efi-y=3D $(@D)/.$(@F).0.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ - | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-= y) \ + | $(objtree)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-= y) \ >$(@D)/.$(@F).1.S $(MAKE) $(build)=3D$(@D) efi-y=3D $(@D)/.$(@F).1.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ - | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ + | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \ >$(@D)/$(@F).map rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]* =20 @@ -199,28 +199,28 @@ note_file_option ?=3D $(note_file) =20 extra-$(XEN_BUILD_PE) +=3D efi.lds ifeq ($(XEN_BUILD_PE),y) -$(TARGET).efi: $(BASEDIR)/prelink.o $(note_file) $(obj)/efi.lds $(obj)/efi= /relocs-dummy.o $(obj)/efi/mkreloc +$(TARGET).efi: $(objtree)/prelink.o $(note_file) $(obj)/efi.lds $(obj)/efi= /relocs-dummy.o $(obj)/efi/mkreloc ifeq ($(CONFIG_DEBUG_INFO),y) $(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug inf= o from $(@F)" endif $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< $(rel= ocs-dummy) \ - $(BASEDIR)/common/symbols-dummy.o $(note_file_option) -o = $(@D)/.$(@F).$(base).0 &&) : + $(objtree)/common/symbols-dummy.o $(note_file_option) -o = $(@D)/.$(@F).$(base).0 &&) : $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).0= ) >$(@D)/.$(@F).0r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).0 \ - | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s= .S + | $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s= .S $(MAKE) $(build)=3D$(@D) efi-y=3D .$(@F).0r.o .$(@F).0s.o $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file_option) -= o $(@D)/.$(@F).$(base).1 &&) : $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).1= ) >$(@D)/.$(@F).1r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).1 \ - | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s= .S + | $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s= .S $(MAKE) $(build)=3D$(@D) efi-y=3D .$(@F).1r.o .$(@F).1s.o $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(note_file_option) -= o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ - | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort >$(@D)/= $(@F).map + | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort >$(@D)/= $(@F).map rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]* else $(TARGET).efi: FORCE @@ -232,11 +232,11 @@ endif $(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: ; =20 .PHONY: include -include: $(BASEDIR)/arch/x86/include/asm/asm-macros.h +include: $(objtree)/arch/x86/include/asm/asm-macros.h =20 $(obj)/asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P =20 -$(BASEDIR)/arch/x86/include/asm/asm-macros.h: $(obj)/asm-macros.i $(src)/M= akefile +$(objtree)/arch/x86/include/asm/asm-macros.h: $(obj)/asm-macros.i $(src)/M= akefile $(call filechk,asm-macros.h) =20 define filechk_asm-macros.h diff --git a/xen/common/Makefile b/xen/common/Makefile index dc8d3a13f5b8..30641a737231 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -74,7 +74,7 @@ obj-$(CONFIG_UBSAN) +=3D ubsan/ obj-$(CONFIG_NEEDS_LIBELF) +=3D libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) +=3D libfdt/ =20 -CONF_FILE :=3D $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(BASEDIR)/)$(KCONFI= G_CONFIG) +CONF_FILE :=3D $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(objtree)/)$(KCONFI= G_CONFIG) $(obj)/config.gz: $(CONF_FILE) gzip -n -c $< >$@ =20 diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index e6fee84b69da..ddb07371315e 100644 --- a/xen/test/livepatch/Makefile +++ b/xen/test/livepatch/Makefile @@ -22,9 +22,9 @@ $(obj)/xen_hello_world.o: $(obj)/config.h $(obj)/config.h: $(obj)/xen_hello_world_func.o (set -e; \ echo "#define NEW_CODE_SZ $(call CODE_SZ,$<,xen_hello_world)"; \ - echo "#define MINOR_VERSION_SZ $(call CODE_SZ,$(BASEDIR)/xen-syms,xen_mi= nor_version)"; \ - echo "#define MINOR_VERSION_ADDR $(call CODE_ADDR,$(BASEDIR)/xen-syms,xe= n_minor_version)"; \ - echo "#define OLD_CODE_SZ $(call CODE_SZ,$(BASEDIR)/xen-syms,xen_extra_v= ersion)") > $@ + echo "#define MINOR_VERSION_SZ $(call CODE_SZ,$(objtree)/xen-syms,xen_mi= nor_version)"; \ + echo "#define MINOR_VERSION_ADDR $(call CODE_ADDR,$(objtree)/xen-syms,xe= n_minor_version)"; \ + echo "#define OLD_CODE_SZ $(call CODE_SZ,$(objtree)/xen-syms,xen_extra_v= ersion)") > $@ =20 $(obj)/modinfo.o: (set -e; \ @@ -42,7 +42,7 @@ $(obj)/modinfo.o: # not be built (it is for EFI builds), and that we do not have # the note.o.bin to muck with (as it gets deleted) # -$(obj)/note.o: $(BASEDIR)/xen-syms +$(obj)/note.o: $(objtree)/xen-syms $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=3D.data=3D.livepatch.depends,alloc,load,readonly,dat= a,contents -S $@.bin $@ @@ -52,7 +52,7 @@ $(obj)/note.o: $(BASEDIR)/xen-syms # Append .livepatch.xen_depends section # with Xen build-id derived from xen-syms. # -$(obj)/xen_note.o: $(BASEDIR)/xen-syms +$(obj)/xen_note.o: $(objtree)/xen-syms $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=3D.data=3D.livepatch.xen_depends,alloc,load,readonly= ,data,contents -S $@.bin $@ @@ -125,7 +125,7 @@ xen_action_hooks_norevert-objs :=3D xen_action_hooks_ma= rker.o xen_hello_world_func =20 EXPECT_BYTES_COUNT :=3D 8 CODE_GET_EXPECT=3D$(shell $(OBJDUMP) -d --insn-width=3D1 $(1) | sed -n -e = '/<'$(2)'>:$$/,/^$$/ p' | tail -n +2 | head -n $(EXPECT_BYTES_COUNT) | awk = '{$$0=3D$$2; printf "%s", substr($$0,length-1)}' | sed 's/.\{2\}/0x&,/g' | = sed 's/^/{/;s/,$$/}/g') -$(obj)/expect_config.h: $(BASEDIR)/xen-syms +$(obj)/expect_config.h: $(objtree)/xen-syms (set -e; \ echo "#define EXPECT_BYTES $(call CODE_GET_EXPECT,$<,xen_extra_version)"= ; \ echo "#define EXPECT_BYTES_COUNT $(EXPECT_BYTES_COUNT)") > $@ --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848074; cv=none; d=zohomail.com; s=zohoarc; b=Z93a2vh5/7WEPjvWb93c9yUGYAcKFMZoUGoG1+9AATV1HJmyrBjwWD0WTvRn8gaNM7Ld/Y7pQjHPwsB+PzLGleqvUtd1qNtdiU3AEayd56ucXnTop92d4Dv8U1SukFduKCSDqvW6srcV0ayR1n/gErhAPtA7jlRI5ZuPMSAEY9I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848074; 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=vbMMU4Pn3I1hTZx4Q5kA29CmDKdpdpxaCFGx88YBrj8=; b=et4En/inP62Nh+7DoXkITrsRYbejAlzvR+K4GU2CFXYD3u9HVYi3iqKRtySdnvAuUzMUUd3gTMbSgwowxiec1r0XkIg1u4pesIwwR+Nd6gtFLYFQJznc5NQ3k7PkkMYW1+EGBgKgbIiko+SqnlFW4sgd8C9+qVxtsbx18+D/qv8= 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 1637848074677343.7102085109693; Thu, 25 Nov 2021 05:47:54 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231291.400264 (Exim 4.92) (envelope-from ) id 1mqF6B-0005ql-R0; Thu, 25 Nov 2021 13:47:39 +0000 Received: by outflank-mailman (output) from mailman id 231291.400264; Thu, 25 Nov 2021 13:47:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6A-0005ie-Vp; Thu, 25 Nov 2021 13:47:39 +0000 Received: by outflank-mailman (input) for mailman id 231291; Thu, 25 Nov 2021 13:47:36 +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 1mqF0N-0007NX-Uj for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:40 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6a04796b-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:38 +0100 (CET) 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: 6a04796b-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847698; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FtVQFQfJL5CyXQ1ZSfQvYF26EeFUF5cby1srpXXTn8k=; b=eZqFY6otvEt7tCa2l/8ciQWddfU4yRN8YMdX8JmxiFgzm5M6ViyiJpsB mcjUkWdAe4OgQETYPwXLIS+VGq9OVa8UqmhBVlWOWPsdntcmhN26+2zqP Gf8lpsiPfFzr1q5zim9PGw5bI8e/lQSXuwkubfSKhsCSw2ObX8Fz1HG6C 4=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: +bIhSrwkA0hCCTnI0uc+8tdcEcuFSS9cQlB329mXcfgAXawm9cc4E+2Rz+TukriUS29v6WUTOX 2Gne4sCyhjlpCU0TAj/k1sD/QdshbEO4qe3nKQib9BNLX8LTysKThcU1rhl8wm5NyAxdem2gLL otA7XzrIsyLj+oUiKoMqSEZqiMPBVPRiXaNEQJ42u+0I7WDh7yYw7f5O2EhpgE1S1jPWfA06Ge H5bMlV+8AfqPQMWhx91XPaafKyOC9sYjWbN093bkhYx3R+R/xmHG9JS0Ls5G9QOt52Z8miLbWL QbXARuq/LDXCMIT6tnIWW7wR X-SBRS: 5.1 X-Mesage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1 XCzK5vEMJriIf47pAdavs9EuVPR+ggwxHnIWbfwxAm93LyVaRa9EOlebwTRP7Bpvfna8W05F uqz0OPQlX1ivBDWOHGLoeb/03hWRZTEOXwGg5MOLbPSSuaXMGogF+XQ0dscl39NxMxoehPz1 ijlACdwkQOn7VWecFniQi0zOdvHAMckxVpmbHNEALpd8yV6CWpZxPxELMVfkHhO3LEL8MOYu NFZIZjdWaoWFWyck9nfBLGkxLFfmN2QrVrmF0KYjPIXJvaMniTFpY3peBXB7i4LAnblvMcyu eT4hAjaXYACV0JpC8OPMKCjyFa4vH48nuNuXhSXfokPKRu0qIU6eTbsivIXIt0XLUmRzDWty AvLUwwTovPAotFp/YCR17yEtYqgD8B3AlFeQzvA9b+zOCSDpjijzIZMXfymZzfYUG+oqqyua f8Ml6P3MeEdnUYMuI15Su45waU77trphrlb0gU7QymbMwX1UutteyDU09NOu6tBwq5ilTG3A k/fqMNHPbipOd/+FAJDLgQSceneh+ofnSPf7KppLRyitjN35reOTW5bIwKI1H5GNLJwPY4on bUhtcoR51DtgxYmKI/b3CVd9mDKJX0cSaQ38JodBdaz2AYsz1hDZ73aCzP3v87TO4kdbBFyL 2/GnrfGipRd2lHGIig6GnX61OZAgYgD5UJRx1gYKlXVwtfIi5fbBvGKHejbmuiN8ih67g== IronPort-HdrOrdr: A9a23:9GPbgKH7ACxPdG0tpLqE0MeALOsnbusQ8zAXP0AYc3Jom6uj5q aTdZUgpGfJYVkqOE3I9ertBEDEewK4yXcX2/h3AV7BZniEhILAFugLhuGO/9SjIVybygc079 YYT0EUMrzN5DZB4voSmDPIceod/A== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58617688" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v8 29/47] build: replace $(BASEDIR) and use $(srctree) Date: Thu, 25 Nov 2021 13:39:48 +0000 Message-ID: <20211125134006.1076646-30-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848076400100001 Content-Type: text/plain; charset="utf-8" $(srctree) is a better description for the source directory than $(BASEDIR) that has been used for both source and build directory (which where the same). This adds $(srctree) to a few path where make's VPATH=3D$(srctree) won't apply. And replace $(BASEDIR) by $(srctree). Introduce "$(srcdir)" as a shortcut for "$(srctree)/$(src)" as the later is used often enough. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v8: - merge of two patchs from v7: build: add $(srctree) in few key places build: replace $(BASEDIR) by $(srctree) both patch were acked - introduce $(srcdir) as a shortcut for $(srctree)/$(src) xen/Kconfig | 4 ++-- xen/Makefile | 7 +++---- xen/Rules.mk | 9 ++++++--- xen/arch/x86/arch.mk | 2 +- xen/build.mk | 4 ++-- xen/common/Makefile | 2 +- xen/common/libfdt/Makefile | 2 +- xen/include/Makefile | 14 +++++++------- xen/scripts/Kconfig.include | 2 +- xen/scripts/Makefile.clean | 5 ++++- xen/xsm/flask/Makefile | 10 +++++----- 11 files changed, 33 insertions(+), 28 deletions(-) diff --git a/xen/Kconfig b/xen/Kconfig index bcbd2758e5d3..ac9a638d372e 100644 --- a/xen/Kconfig +++ b/xen/Kconfig @@ -14,14 +14,14 @@ config CC_IS_GCC =20 config GCC_VERSION int - default $(shell,$(BASEDIR)/scripts/gcc-version.sh $(CC)) + default $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) =20 config CC_IS_CLANG def_bool $(success,$(CC) --version | head -n 1 | grep -q clang) =20 config CLANG_VERSION int - default $(shell,$(BASEDIR)/scripts/clang-version.sh $(CC)) + default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) =20 # -fvisibility=3Dhidden reduces -fpic cost, if it's available config CC_HAS_VISIBILITY_ATTRIBUTE diff --git a/xen/Makefile b/xen/Makefile index 2a809d577fc3..318320e79c7d 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -19,8 +19,7 @@ export PYTHON ?=3D $(PYTHON_INTERPRETER) =20 export CHECKPOLICY ?=3D checkpolicy =20 -export BASEDIR :=3D $(CURDIR) -export XEN_ROOT :=3D $(BASEDIR)/.. +export XEN_ROOT :=3D $(CURDIR)/.. =20 abs_objtree :=3D $(CURDIR) abs_srctree :=3D $(CURDIR) @@ -189,7 +188,7 @@ ifeq ($(TARGET_ARCH),x86) t1 =3D $(call as-insn,$(CC),".L0: .L1: .skip (.L1 - .L0)",,-no-integrated-= as) =20 # Check whether clang asm()-s support .include. -t2 =3D $(call as-insn,$(CC) -I$(BASEDIR)/arch/x86/include,".include \"asm/= asm-defns.h\"",,-no-integrated-as) +t2 =3D $(call as-insn,$(CC) -I$(srctree)/arch/x86/include,".include \"asm/= asm-defns.h\"",,-no-integrated-as) =20 # Check whether clang keeps .macro-s between asm()-s: # https://bugs.llvm.org/show_bug.cgi?id=3D36110 @@ -329,7 +328,7 @@ ALL_OBJS-$(CONFIG_CRYPTO) +=3D crypto/built_in.o =20 ALL_LIBS-y :=3D lib/lib.a =20 -include $(BASEDIR)/arch/$(TARGET_ARCH)/arch.mk +include $(srctree)/arch/$(TARGET_ARCH)/arch.mk =20 export ALL_OBJS :=3D $(ALL_OBJS-y) export ALL_LIBS :=3D $(ALL_LIBS-y) diff --git a/xen/Rules.mk b/xen/Rules.mk index cd00f006ee8f..20dedce06cd8 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -9,13 +9,16 @@ endif =20 src :=3D $(obj) =20 +# shortcut for $(srctree)/$(src) +srcdir :=3D $(srctree)/$(src) + PHONY :=3D __build __build: =20 -include $(objtree)/include/config/auto.conf =20 include $(XEN_ROOT)/Config.mk -include $(BASEDIR)/scripts/Kbuild.include +include $(srctree)/scripts/Kbuild.include =20 # Initialise some variables obj-y :=3D @@ -58,7 +61,7 @@ cmd_objcopy =3D $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ # binfile # use e.g. $(call if_changed,binfile,binary-file varname) quiet_cmd_binfile =3D BINFILE $@ -cmd_binfile =3D $(SHELL) $(BASEDIR)/tools/binfile $(BINFILE_FLAGS) $@ $(2) +cmd_binfile =3D $(SHELL) $(srctree)/tools/binfile $(BINFILE_FLAGS) $@ $(2) =20 # Figure out what we need to build from the various variables # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D @@ -177,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 $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk +include $(srctree)/arch/$(TARGET_ARCH)/Rules.mk =20 c_flags +=3D $(_c_flags) a_flags +=3D $(_c_flags) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 1ba488d645c0..7cfc9fd3bb1c 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -63,7 +63,7 @@ ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y) efi-check-o :=3D arch/x86/efi/check.o =20 # Check if the compiler supports the MS ABI. -XEN_BUILD_EFI :=3D $(call if-success,$(CC) $(CFLAGS) -c $(efi-check-o:.o= =3D.c) -o $(efi-check-o),y) +XEN_BUILD_EFI :=3D $(call if-success,$(CC) $(CFLAGS) -c $(srctree)/$(efi-c= heck-o:.o=3D.c) -o $(efi-check-o),y) =20 # Check if the linker supports PE. EFI_LDFLAGS :=3D $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=3D10 diff --git a/xen/build.mk b/xen/build.mk index c471312f98a3..65d8dbc13828 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -26,9 +26,9 @@ define cmd_compile.h -e 's/@@version@@/$(XEN_VERSION)/g' \ -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \ -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ - -e 's!@@changeset@@!$(shell tools/scmversion $(XEN_ROOT) || echo "una= vailable")!g' \ + -e 's!@@changeset@@!$(shell $(srctree)/tools/scmversion $(XEN_ROOT) |= | echo "unavailable")!g' \ < $< > $(dot-target).tmp; \ - sed -rf tools/process-banner.sed < .banner >> $(dot-target).tmp; \ + sed -rf $(srctree)/tools/process-banner.sed < .banner >> $(dot-target).tm= p; \ mv -f $(dot-target).tmp $@; \ fi endef diff --git a/xen/common/Makefile b/xen/common/Makefile index 30641a737231..b1e076c30b81 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -80,7 +80,7 @@ $(obj)/config.gz: $(CONF_FILE) =20 $(obj)/config_data.o: $(obj)/config.gz =20 -$(obj)/config_data.S: $(BASEDIR)/tools/binfile FORCE +$(obj)/config_data.S: $(srctree)/tools/binfile FORCE $(call if_changed,binfile,$(obj)/config.gz xen_config_data) targets +=3D config_data.S =20 diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile index 6708af12e583..75aaefa2e37f 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -6,7 +6,7 @@ OBJCOPYFLAGS :=3D $(foreach s,$(SECTIONS),--rename-section = .$(s)=3D.init.$(s)) obj-y +=3D libfdt.o nocov-y +=3D libfdt.o =20 -CFLAGS-y +=3D -I$(BASEDIR)/include/xen/libfdt/ +CFLAGS-y +=3D -I$(srctree)/include/xen/libfdt/ =20 $(obj)/libfdt.o: $(obj)/libfdt-temp.o FORCE $(call if_changed,objcopy) diff --git a/xen/include/Makefile b/xen/include/Makefile index a3c2511f5f60..5a2b4c9f65fa 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -45,22 +45,22 @@ public-$(CONFIG_ARM) :=3D $(wildcard $(src)/public/arch= -arm/*.h $(src)/public/arch .PHONY: all all: $(addprefix $(obj)/,$(headers-y)) =20 -$(obj)/compat/%.h: $(obj)/compat/%.i $(src)/Makefile $(BASEDIR)/tools/comp= at-build-header.py - $(PYTHON) $(BASEDIR)/tools/compat-build-header.py <$< $(patsubst $(obj)/%= ,%,$@) >>$@.new; \ +$(obj)/compat/%.h: $(obj)/compat/%.i $(src)/Makefile $(srctree)/tools/comp= at-build-header.py + $(PYTHON) $(srctree)/tools/compat-build-header.py <$< $(patsubst $(obj)/%= ,%,$@) >>$@.new; \ mv -f $@.new $@ =20 $(obj)/compat/%.i: $(obj)/compat/%.c $(src)/Makefile $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CF= LAGS)) $(cppflags-y) -o $@ $< =20 -$(obj)/compat/%.c: $(src)/public/%.h $(src)/xlat.lst $(src)/Makefile $(BAS= EDIR)/tools/compat-build-source.py +$(obj)/compat/%.c: $(src)/public/%.h $(src)/xlat.lst $(src)/Makefile $(src= tree)/tools/compat-build-source.py mkdir -p $(@D) - $(PYTHON) $(BASEDIR)/tools/compat-build-source.py $(src)/xlat.lst <$< >$@= .new + $(PYTHON) $(srctree)/tools/compat-build-source.py $(srcdir)/xlat.lst <$< = >$@.new mv -f $@.new $@ =20 -$(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst $(BAS= EDIR)/tools/get-fields.sh $(src)/Makefile +$(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst $(src= tree)/tools/get-fields.sh $(src)/Makefile export PYTHON=3D$(PYTHON); \ while read what name; do \ - $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $< || exi= t $$?; \ + $(SHELL) $(srctree)/tools/get-fields.sh "$$what" compat_$$name $< || exi= t $$?; \ done <$(patsubst $(obj)/compat/%,$(obj)/compat/.xlat/%,$(basename $<)).ls= t >$@.new mv -f $@.new $@ =20 @@ -70,7 +70,7 @@ $(obj)/compat/.xlat/%.lst: $(src)/xlat.lst $(src)/Makefile grep -v '^[[:blank:]]*#' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -re '= s,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' >$@.new $(call move-if-changed,$@.new,$@) =20 -xlat-y :=3D $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:b= lank:]]+[^[:blank:]]+[[:blank:]]+,,p' $(src)/xlat.lst | uniq) +xlat-y :=3D $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:b= lank:]]+[^[:blank:]]+[[:blank:]]+,,p' $(srcdir)/xlat.lst | uniq) xlat-y :=3D $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y)) =20 $(obj)/compat/xlat.h: $(addprefix $(obj)/compat/.xlat/,$(xlat-y)) $(obj)/c= onfig/auto.conf $(src)/Makefile diff --git a/xen/scripts/Kconfig.include b/xen/scripts/Kconfig.include index e1f13e17207e..389a690a127a 100644 --- a/xen/scripts/Kconfig.include +++ b/xen/scripts/Kconfig.include @@ -40,4 +40,4 @@ $(error-if,$(failure,command -v $(CC)),compiler '$(CC)' n= ot found) $(error-if,$(failure,command -v $(LD)),linker '$(LD)' not found) =20 # gcc version including patch level -gcc-version :=3D $(shell,$(BASEDIR)/scripts/gcc-version.sh $(CC)) +gcc-version :=3D $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index 4eed31974509..53f7a76b3075 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -5,9 +5,12 @@ =20 src :=3D $(obj) =20 +# shortcut for $(srctree)/$(src) +srcdir :=3D $(srctree)/$(src) + clean:: =20 -include $(BASEDIR)/scripts/Kbuild.include +include $(srctree)/scripts/Kbuild.include =20 include $(src)/Makefile =20 diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 4ac6fb8778ae..a99038cb5722 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -8,8 +8,8 @@ CFLAGS-y +=3D -I$(obj)/include =20 AWK =3D awk =20 -FLASK_H_DEPEND :=3D $(addprefix $(src)/policy/,security_classes initial_si= ds) -AV_H_DEPEND =3D $(src)/policy/access_vectors +FLASK_H_DEPEND :=3D $(addprefix $(srcdir)/policy/,security_classes initial= _sids) +AV_H_DEPEND :=3D $(srcdir)/policy/access_vectors =20 FLASK_H_FILES :=3D flask.h class_to_string.h initial_sid_to_string.h AV_H_FILES :=3D av_perm_to_string.h av_permissions.h @@ -18,14 +18,14 @@ ALL_H_FILES :=3D $(addprefix include/,$(FLASK_H_FILES) = $(AV_H_FILES)) $(addprefix $(obj)/,$(obj-y)) $(obj)/ss/built_in.o: $(addprefix $(obj)/,$(= ALL_H_FILES)) extra-y +=3D $(ALL_H_FILES) =20 -mkflask :=3D $(src)/policy/mkflask.sh +mkflask :=3D $(srcdir)/policy/mkflask.sh quiet_cmd_mkflask =3D MKFLASK $@ cmd_mkflask =3D $(SHELL) $(mkflask) $(AWK) $(obj)/include $(FLASK_H_DEPEND) =20 $(addprefix $(obj)/%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE $(call if_changed,mkflask) =20 -mkaccess :=3D $(src)/policy/mkaccess_vector.sh +mkaccess :=3D $(srcdir)/policy/mkaccess_vector.sh quiet_cmd_mkaccess =3D MKACCESS VECTOR $@ cmd_mkaccess =3D $(SHELL) $(mkaccess) $(AWK) $(obj)/include $(AV_H_DEPEND) =20 @@ -36,7 +36,7 @@ obj-bin-$(CONFIG_XSM_FLASK_POLICY) +=3D flask-policy.o $(obj)/flask-policy.o: $(obj)/policy.bin =20 $(obj)/flask-policy.S: BINFILE_FLAGS :=3D -i -$(obj)/flask-policy.S: $(BASEDIR)/tools/binfile FORCE +$(obj)/flask-policy.S: $(srctree)/tools/binfile FORCE $(call if_changed,binfile,$(obj)/policy.bin xsm_flask_init_policy) targets +=3D flask-policy.S =20 --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848058; cv=none; d=zohomail.com; s=zohoarc; b=jJOYgE+sTf6f9tqiWwBEJnCWuWYhJ+dx7JWmjc4cg5lKhn5+3vQayKXE4Rf0unujMnaeAsihHDH1pgSjwPAwTIlUbv8343s3klyGsy7wz6H1XpvKvztmGgoZ/JczGJi3G94vdMDt1a6G9WEBtNigZXwot0Fc7agETcMjJKem1Yc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848058; 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=8WK2mt4rLBk3B8oo5w2dAlU3tehXZ0QE+xpMMB87BbQ=; b=bK67BXaQD7pkJTzD8KLVnH6SKr0EU+9zKZcR3WVBtSwoDjfz4TNDOwSLU5CLnJh9AzEVEvewQWaYLnNNAnhPFeUBjB9cJs8O4JQFOYeUWqxucwYXaWhR8XEEOKiTiP0SY2bIc4VWb1PKmKyRuh2DPM+b/PQpo4UNCNGGPqvwvvs= 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 1637848058763740.6922285716643; Thu, 25 Nov 2021 05:47:38 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231278.400211 (Exim 4.92) (envelope-from ) id 1mqF5x-00036F-Or; Thu, 25 Nov 2021 13:47:25 +0000 Received: by outflank-mailman (output) from mailman id 231278.400211; Thu, 25 Nov 2021 13:47:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5x-00035u-Go; Thu, 25 Nov 2021 13:47:25 +0000 Received: by outflank-mailman (input) for mailman id 231278; Thu, 25 Nov 2021 13:47:23 +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 1mqF0Q-0007NX-JW for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:42 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6b070573-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:41 +0100 (CET) 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: 6b070573-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847701; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EuHi73nC8Lo2X69xXlwl/JFsLjuB22umM4hppbRP7sA=; b=N2XMfd1dxLtLCFYDFwGEjExr+Xgo9Y00OgL4rF4rbox+RlebOK1jiR0o FERt+cTmqwpCqT7CokV1/+TGk1g7B7W+n7CQrKbh87CtM3kj8KNol/fcL f8mQybmoYTjAr9O/8ZpBXuwsAy3H3224Hf4mHin4T6TKWVBF/ZbKSb/XX 0=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: a2TZ0JpCMic4LK80dwx4//vXt6zJcghg/RwWZMcGviTPCuuK9qqQM15vDv5PvYYOilRhbiKe76 kz6e9vByi8e9WGr/p/40Nsr3uNnJRAQZyYN/DeHkV6E7vF5zVEW0TYeiiF0zXF16AKKX2EE4/b XNn9xJFdSTcMR8umUhH6x9dhDqvdQAxdVXhxMW+sL0qiqtTJhCLbuU9ZBQq0XTuoiNGTkZh3Fd A1gCGdK+y7tUsGILa3Abi/hXxrb7Lwr20rbSD/g6G5sMZY1SlgdCtSEasJX/XOzWnBYQHuq/jH q3AY9dADfufEV8aPtNLT36io X-SBRS: 5.1 X-MesageID: 60634165 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:L4O2nqgwA0DFXhPOwCqqo/m7X161nRcKZh0ujC45NGQN5FlHY01je htvX2mAbvreYmT2et9yOdni9UtUvJ7WyIA1GVNvqC8wRXsb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oAMKRCQ7InQLlbGILes1htZGEk0F0/NtTo5w7Rg29cy3IDja++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QK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sSrMsEk1fFmjdzLC3KSiFoTbznd4eCL6FJGmPWnn19aOuY fRu48v9aPBXzkxXt4dcEqpwyf5s7dXYuLIHnB9vG2/Gbgr3B+o4cGWGx8RGqoZE2qRd5VmtQ kuK99RXZeeJNcfiHAJDLQYpdL3eh/Qdmz2U5vUpOkTqoiRw+ePfA0lVOhCNjg1bLad0b9x5k btw5pZO5lztkAcuP/aHkjtQpjaFIXE3Wqk6so0XXd3wgQ0xx1AeOZHRB0caOn1Uhwmg5qXyH gKpuQ== IronPort-HdrOrdr: A9a23:MyexUamP7sLWx0ELc7hHh1sTS2XpDfIq3DAbv31ZSRFFG/Fxl6 iV88jzsiWE7wr5OUtQ4OxoV5PgfZqxz/NICMwqTNWftWrdyQ+VxeNZjbcKqgeIc0aVygce79 YET0EXMqyXMbEQt6jHCWeDf+rIuOP3k5yVuQ== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634165" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 30/47] build: rework "headers*.chk" prerequisite in include/ Date: Thu, 25 Nov 2021 13:39:49 +0000 Message-ID: <20211125134006.1076646-31-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848060637100001 Content-Type: text/plain; charset="utf-8" Listing public headers when out-of-tree build are involved becomes more annoying where every path to every headers needs to start with "$(srctree)/$(src)", or $(wildcard ) will not work. This means more repetition. ( "$(srcdir)" is a shortcut for "$(srctree)/$(src)" ) This patch attempt to reduce the amount of duplication and make better use of make's meta programming capability. The filters are now listed in a variable and don't have to repeat the path to the headers files as this is added later as needed. Signed-off-by: Anthony PERARD --- Notes: v8: - add prefix "public-" to newly introduced macros. - make use of the new "$(srcdir)" shortcut. xen/include/Makefile | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index 5a2b4c9f65fa..6e80ef276fd9 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -39,8 +39,8 @@ cppflags-$(CONFIG_X86) +=3D -m32 =20 endif =20 -public-$(CONFIG_X86) :=3D $(wildcard $(src)/public/arch-x86/*.h $(src)/pub= lic/arch-x86/*/*.h) -public-$(CONFIG_ARM) :=3D $(wildcard $(src)/public/arch-arm/*.h $(src)/pub= lic/arch-arm/*/*.h) +public-$(CONFIG_X86) :=3D $(wildcard $(srcdir)/public/arch-x86/*.h $(srcdi= r)/public/arch-x86/*/*.h) +public-$(CONFIG_ARM) :=3D $(wildcard $(srcdir)/public/arch-arm/*.h $(srcdi= r)/public/arch-arm/*/*.h) =20 .PHONY: all all: $(addprefix $(obj)/,$(headers-y)) @@ -81,10 +81,21 @@ ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH)) =20 all: $(obj)/headers.chk $(obj)/headers99.chk $(obj)/headers++.chk =20 -PUBLIC_HEADERS :=3D $(filter-out $(src)/public/arch-% $(src)/public/dom0_o= ps.h, $(wildcard $(src)/public/*.h $(src)/public/*/*.h) $(public-y)) +public-hdrs-path :=3D $(srcdir)/public =20 -PUBLIC_C99_HEADERS :=3D $(src)/public/io/9pfs.h $(src)/public/io/pvcalls.h -PUBLIC_ANSI_HEADERS :=3D $(filter-out $(src)/public/%ctl.h $(src)/public/x= sm/% $(src)/public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) +public-list-headers =3D $(wildcard $1/*.h $1/*/*.h) +public-filter-headers =3D $(filter-out $(addprefix $(public-hdrs-path)/,$(= $1-filter)), $($1)) + +public-c99-headers :=3D io/9pfs.h io/pvcalls.h +public-headers :=3D $(call public-list-headers,$(public-hdrs-path)) $(publ= ic-y) +public-ansi-headers :=3D $(public-headers) + +public-headers-filter :=3D dom0_ops.h arch-% +public-ansi-headers-filter :=3D %ctl.h xsm/% %hvm/save.h $(public-headers-= filter) $(public-c99-headers) + +PUBLIC_HEADERS :=3D $(call public-filter-headers,public-headers) +PUBLIC_ANSI_HEADERS :=3D $(call public-filter-headers,public-ansi-headers) +PUBLIC_C99_HEADERS :=3D $(addprefix $(public-hdrs-path)/, $(public-c99-hea= ders)) =20 $(src)/public/io/9pfs.h-prereq :=3D string $(src)/public/io/pvcalls.h-prereq :=3D string --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848080; cv=none; d=zohomail.com; s=zohoarc; b=E5c/lO3wiT/emkNLf4jcZhKelx5H0asAQbc3SuSAGxYKh5oEBJCXiavmIq25sHmmr5lJZfh7aRq1WvOuXRmkUPesVoRNWUxReQwA8/l/pUxl3izuPYQVBl9h9E/DgIWu4zrCklsELVBJJbnkqM53bgy4BfZQSRJTArt2/7gLMgQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848080; 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=C2wcqIp4z/acs7Y7TYDlwAqIxisBHDQ1dg477SBdvMs=; b=GoYKw2x6bdEIXG2QbmXx58eSTLGJ1gbP7hxxt0x/d8tF5tdE+0Ps0KxI+dMxVXi29cGLYGZ5+MPAXAa9gVrxZJlPtLn8z8qW/quiyhHAUOBOdho9C7WYpxtKWMtd+8q3Vo8igLgwvcKr9XskP79xfdv4b+sZ4iAlJVhiemeHDiA= 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 1637848080945993.5527548487706; Thu, 25 Nov 2021 05:48:00 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231301.400297 (Exim 4.92) (envelope-from ) id 1mqF6I-0007HT-0S; Thu, 25 Nov 2021 13:47:46 +0000 Received: by outflank-mailman (output) from mailman id 231301.400297; Thu, 25 Nov 2021 13:47:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6H-0007Da-HU; Thu, 25 Nov 2021 13:47:45 +0000 Received: by outflank-mailman (input) for mailman id 231301; Thu, 25 Nov 2021 13:47:42 +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 1mqF0R-00076i-MN for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:43 +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 6c38fcfb-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:42 +0100 (CET) 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: 6c38fcfb-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847702; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OsKJvcTnM3GGC2/leNBoxzvD1HK4BcTwvqLEsU81iFo=; b=QVNcpslMLuk8zIuy6mpmIU5RHsJBZgsH9PozpfVpPltSdtMSkj6wjsSh Hb0F918twzOyWKGUfk4Jm9Yy900MW0ZRwq2lGAd8dIgpMq6AAroj+Tz8u CKVtc+JHssbuhp4qrxfyJ7yaCrwW25qkgl7GuB017/fLVgIw2QaKW2/Vr c=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: kjW6lYmqIINNFnmqMeEW+BPRR5neMNRzbOvX7xVTZ6Q/QIYJ7w2aYpztOjuDGNhr0Q1Jh6QxMT yAbJPBuRj0oLl71wXqkFc42qU4Jph9b7y9o41KCjqrJuWsWo4GQAo//SFmUTnZV2Uix5chyvZR jW+w1DBJ7Dry56KffZL5wytNKWxy7AjTYIZRpUOExVpHaHj3rMJwaNHtQ1TZY72OL+49Koul++ aRyg+gWMz0/buTBMdTlezpZs7v9aRhRRsO2dIUUsNyJWY/swt9I2RqrIiLbsON9/COFbkO+K3b p8ezde/N4Q0M6oaRtOCq5Kjn X-SBRS: 5.1 X-MesageID: 58637871 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:YLXLKKmUtERygeINd4HDZhno5gx8IURdPkR7XQ2eYbSJt1+Wr1Gzt xIbWGCDPa3eYzSnf4wiO4u09EMGsJLcytZrQQVqqihkESMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BClVlxJVF/fngqoDUUYYoAQgsA187IMsdoUg7wbdg29Q12YL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pIe8c1u97jQKAwq2qdA6/ ++q2DTETMdRXA9lFsvXNq6ilgvjoXgHletudELUOd0PKl70+Y1nJnWp3P86Ks0BMzvZwT6e2 1rECBsUv7CV8YQ07MPIleaPqILwS7lyGU9THm/667eqNHaFojr/kNEYCOvRJGLTTmL5/qmmd N559fCkPa1VhktOvqp9D61vkfA06ezwquII1Q9jBnjKMQimU+syPnmc0MBTnaRR3bsF6xCuU 0eC99QGa7WEPMTpTAwYKAY/N7nR0PgVnn/Z7OgvIVW87yhypeLVXUJXNhiKqSpcMLoqb991n bZ/4JYbu16llx4nEtealSQFpW2DI0sJX7gjqpxHUpTgjRAmyw0abJHRYsMsDEpjtzmY3pEWH wKp IronPort-HdrOrdr: A9a23:T7lLD6AheAJ13f/lHemq55DYdb4zR+YMi2TC1yhKJiC9Ffbo8P xG/c5rrCMc5wxxZJhNo7290ey7MBHhHP1OkO0s1NWZPDUO0VHAROoJ0WKh+UyEJ8SXzJ866U 4KScZD4bPLYWSS9fyKgzWFLw== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58637871" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 31/47] build: specify source tree in include/ for prerequisite Date: Thu, 25 Nov 2021 13:39:50 +0000 Message-ID: <20211125134006.1076646-32-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848081598100007 Content-Type: text/plain; charset="utf-8" When doing an out-of-tree build, and thus setting VPATH, GNU Make 3.81 on Ubuntu Trusty complains about Circular dependency of include/Makefile and include/xlat.lst and drop them. The build fails later due to headers malformed. Signed-off-by: Anthony PERARD --- Notes: v8: - make use of the new "$(srcdir)" shortcut - move the patch ahead of the problematic patch: build: adding out-of-tree support to the xen build xen/include/Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index 6e80ef276fd9..f64bc293c7f4 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -45,19 +45,19 @@ public-$(CONFIG_ARM) :=3D $(wildcard $(srcdir)/public/a= rch-arm/*.h $(srcdir)/publi .PHONY: all all: $(addprefix $(obj)/,$(headers-y)) =20 -$(obj)/compat/%.h: $(obj)/compat/%.i $(src)/Makefile $(srctree)/tools/comp= at-build-header.py +$(obj)/compat/%.h: $(obj)/compat/%.i $(srcdir)/Makefile $(srctree)/tools/c= ompat-build-header.py $(PYTHON) $(srctree)/tools/compat-build-header.py <$< $(patsubst $(obj)/%= ,%,$@) >>$@.new; \ mv -f $@.new $@ =20 -$(obj)/compat/%.i: $(obj)/compat/%.c $(src)/Makefile +$(obj)/compat/%.i: $(obj)/compat/%.c $(srcdir)/Makefile $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CF= LAGS)) $(cppflags-y) -o $@ $< =20 -$(obj)/compat/%.c: $(src)/public/%.h $(src)/xlat.lst $(src)/Makefile $(src= tree)/tools/compat-build-source.py +$(obj)/compat/%.c: $(src)/public/%.h $(srcdir)/xlat.lst $(srcdir)/Makefile= $(srctree)/tools/compat-build-source.py mkdir -p $(@D) $(PYTHON) $(srctree)/tools/compat-build-source.py $(srcdir)/xlat.lst <$< = >$@.new mv -f $@.new $@ =20 -$(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst $(src= tree)/tools/get-fields.sh $(src)/Makefile +$(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst $(src= tree)/tools/get-fields.sh $(srcdir)/Makefile export PYTHON=3D$(PYTHON); \ while read what name; do \ $(SHELL) $(srctree)/tools/get-fields.sh "$$what" compat_$$name $< || exi= t $$?; \ @@ -65,7 +65,7 @@ $(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/= .xlat/%.lst $(srctree)/ mv -f $@.new $@ =20 .PRECIOUS: $(obj)/compat/.xlat/%.lst -$(obj)/compat/.xlat/%.lst: $(src)/xlat.lst $(src)/Makefile +$(obj)/compat/.xlat/%.lst: $(srcdir)/xlat.lst $(srcdir)/Makefile mkdir -p $(@D) grep -v '^[[:blank:]]*#' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -re '= s,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' >$@.new $(call move-if-changed,$@.new,$@) @@ -73,7 +73,7 @@ $(obj)/compat/.xlat/%.lst: $(src)/xlat.lst $(src)/Makefile xlat-y :=3D $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:b= lank:]]+[^[:blank:]]+[[:blank:]]+,,p' $(srcdir)/xlat.lst | uniq) xlat-y :=3D $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y)) =20 -$(obj)/compat/xlat.h: $(addprefix $(obj)/compat/.xlat/,$(xlat-y)) $(obj)/c= onfig/auto.conf $(src)/Makefile +$(obj)/compat/xlat.h: $(addprefix $(obj)/compat/.xlat/,$(xlat-y)) $(obj)/c= onfig/auto.conf $(srcdir)/Makefile cat $(filter %.h,$^) >$@.new mv -f $@.new $@ =20 @@ -100,7 +100,7 @@ PUBLIC_C99_HEADERS :=3D $(addprefix $(public-hdrs-path)= /, $(public-c99-headers)) $(src)/public/io/9pfs.h-prereq :=3D string $(src)/public/io/pvcalls.h-prereq :=3D string =20 -$(obj)/headers.chk: $(PUBLIC_ANSI_HEADERS) $(src)/Makefile +$(obj)/headers.chk: $(PUBLIC_ANSI_HEADERS) $(srcdir)/Makefile for i in $(filter %.h,$^); do \ $(CC) -x c -ansi -Wall -Werror -include stdint.h \ -S -o /dev/null $$i || exit 1; \ @@ -108,7 +108,7 @@ $(obj)/headers.chk: $(PUBLIC_ANSI_HEADERS) $(src)/Makef= ile done >$@.new mv $@.new $@ =20 -$(obj)/headers99.chk: $(PUBLIC_C99_HEADERS) $(src)/Makefile +$(obj)/headers99.chk: $(PUBLIC_C99_HEADERS) $(srcdir)/Makefile rm -f $@.new $(foreach i, $(filter %.h,$^), \ echo "#include "\"$(i)\" \ @@ -118,7 +118,7 @@ $(obj)/headers99.chk: $(PUBLIC_C99_HEADERS) $(src)/Make= file || exit $$?; echo $(i) >> $@.new;) mv $@.new $@ =20 -$(obj)/headers++.chk: $(PUBLIC_HEADERS) $(src)/Makefile +$(obj)/headers++.chk: $(PUBLIC_HEADERS) $(srcdir)/Makefile rm -f $@.new if ! $(CXX) -v >/dev/null 2>&1; then \ touch $@.new; \ --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848067; cv=none; d=zohomail.com; s=zohoarc; b=H+ZXdMYWyWBma1FUOR2R9KZjcO6VhdT8iVXPS2dI+OE7+UtqC416+Pm2c2FuyIoDWP5j+u74qvMApOQtjcqCPqfTWv2W9FP5FOJrnHZ7De97y3nTRuMr9mmBp8hSPBIRUpVdFKkQSQvjXcYILLZFJon88cjI6QJk2mLu9a7nCtA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848067; 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=E7CjXMA2aPVzxSWBhqpWTqJ2P/PBjCJhDmCAAJD6oOs=; b=WtojnYRp9Gc+sz5cIwrQaqstl7aKCF13XngW2NeLJL640dcYwWBsfNwRR11twWMIHl5/zGHebsZFvNJPKdqF6QlH3qsU1shVLk3X9nR4vSpjVIOd/Z/Uz1QSdSqCa+S7ovaLSCHzcVTcTVvaVYuXqgAvRxdcy+Mh5o228E5zVQk= 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 1637848067471310.6244057019969; Thu, 25 Nov 2021 05:47:47 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231281.400230 (Exim 4.92) (envelope-from ) id 1mqF65-0004Hq-8Q; Thu, 25 Nov 2021 13:47:33 +0000 Received: by outflank-mailman (output) from mailman id 231281.400230; Thu, 25 Nov 2021 13:47:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF64-0004Gn-Uy; Thu, 25 Nov 2021 13:47:32 +0000 Received: by outflank-mailman (input) for mailman id 231281; Thu, 25 Nov 2021 13:47:30 +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 1mqF0U-00076i-Mx for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:46 +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 6d6c76ec-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:45 +0100 (CET) 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: 6d6c76ec-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847705; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=o+kA5ufKOUX7cHgHO/shUnoM69Ej2+dSlJV54ErUF+0=; b=G9n+AX1UQo80TDZ+ZBfFvgc1hGpTGfV+/VcF9dm1nH68jxeH6zn3DNr+ B8QLqZpG21IQUvggwNW4EbjRRVEyHNPT/pV14vuKU3Q75GO5RwIeuuLTZ pIOTz3nPPyH4IzRqz3wCgCR4sv4kiQAT6Qm/EflbMe6ytbGjBPzBxZm+G U=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: veMVtzRDvR9Az3eriOtzviuZLksqoVwo3rOzhYcgu6t6xGyCcgZrDIDyy+ZnUL2sruI+A3V+Hi VKoXybqlNMx+/nPfv0vefj0KYz6EMPWptHIRPUqgKYrqM64fk1aGBfK5SfFmIm3bhyO3BsHuaT 5DkotiS1PoF8RqfA3zgv7LQpawWMKyvU58JA/sQwWIZuxBgB/LMYfXzmQcIkHhg6XXrrH1gyJT 7WN5N+hRqzutex27WOpW2K03rbx1OtFOLeoOxmYwAdfJsP6efK4E1wHPoBBbt6y5Ani0mfiZUS 9Scp08EX+5DfzFkihekXMevw X-SBRS: 5.1 X-MesageID: 58135484 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:rOEXRKB7lf11hRVW/9Tkw5YqxClBgxIJ4kV8jS/XYbTApG4n0DUAm 2oWWWuHbPveYGD2L94nb4q/p0JQ7JKBnIM3Q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mZr4nxVpTAMDmFQ/AN6ELbdn94aEBWYEweLV7puVvweQtF 6sOetmaA+QJQTPComxPYZ74pY1kVRKqmQPRYHb1PGlhJ8ZtF17T59vpXgrz7y1SXCC5gtQz/ u+73QTBTJtdGwk7VJTKaOiixk+atGQGnL4gRFPBJ9ReIR2+8IVjJyHroOUwJsUAdUfKyjeAj l7EChYEv+jd5YQy9YCR16yDqo6oFcp4H1ZbQDaHverna3GC8zP6k4FaUeuOcTTMb0/O+f2vN bdP0vXxEPwbh1IW4YByJKlmkPAl7Nz1qr4Ekgk9RCfXb06mA69LK2Wd2ZUdrbVEw7JUtFfkW k+L/dUGa7yFNNm8TQwULQshKO+CyesVin/Z6vFseBf24yp+/bymV0ROPkbT1HwBfeUtaI51k /08vMM26hCkjkt4O9mLuSlY6mCQIyFSSK4grJwbXNfmhwdDJouuunAA5vsaOK2yVug= IronPort-HdrOrdr: A9a23:4cltCq/L8WX0tfj/CiNuk+DgI+orL9Y04lQ7vn2YSXRuHPBw8P re+sjztCWE8Ar5N0tBpTntAsW9qDbnhPtICOoqTNCftWvdyQiVxehZhOOIqVDd8m/Fh4pgPM 9bAtFD4bbLbGSS4/yU3ODBKadD/OW6 X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58135484" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 32/47] build: shuffle main Makefile Date: Thu, 25 Nov 2021 13:39:51 +0000 Message-ID: <20211125134006.1076646-33-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848068677100001 Content-Type: text/plain; charset="utf-8" Reorganize a bit the Makefile ahead of patch "build: adding out-of-tree support to the xen build" This should only be code movement without functional changes. Signed-off-by: Anthony PERARD --- Notes: v8: - new patch xen/Makefile | 58 ++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 318320e79c7d..bfc96562c5ec 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -19,38 +19,11 @@ export PYTHON ?=3D $(PYTHON_INTERPRETER) =20 export CHECKPOLICY ?=3D checkpolicy =20 -export XEN_ROOT :=3D $(CURDIR)/.. - -abs_objtree :=3D $(CURDIR) -abs_srctree :=3D $(CURDIR) - -export abs_srctree abs_objtree - -srctree :=3D . -objtree :=3D . -export srctree objtree - # Do not use make's built-in rules and variables MAKEFLAGS +=3D -rR =20 EFI_MOUNTPOINT ?=3D $(BOOT_DIR)/efi =20 -ARCH=3D$(XEN_TARGET_ARCH) -SRCARCH=3D$(shell echo $(ARCH) | \ - sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g' \ - -e s'/riscv.*/riscv/g') -export ARCH SRCARCH - -# Don't break if the build process wasn't called from the top level -# we need XEN_TARGET_ARCH to generate the proper config -include $(XEN_ROOT)/Config.mk - -# Set ARCH/SUBARCH appropriately. -export TARGET_SUBARCH :=3D $(XEN_TARGET_ARCH) -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') - # Allow someone to change their config file export KCONFIG_CONFIG ?=3D .config =20 @@ -64,8 +37,6 @@ default: build .PHONY: dist dist: install =20 -include scripts/Kbuild.include - ifneq ($(root-make-done),y) # section to run before calling Rules.mk, but only once. =20 @@ -141,6 +112,17 @@ endif =20 export quiet Q KBUILD_VERBOSE =20 +abs_objtree :=3D $(CURDIR) +abs_srctree :=3D $(CURDIR) + +export abs_srctree abs_objtree + +srctree :=3D . +objtree :=3D . +export srctree objtree + +export XEN_ROOT :=3D $(CURDIR)/.. + # To make sure we do not include .config for any of the *config targets # catch them early, and hand them over to tools/kconfig/Makefile =20 @@ -163,6 +145,24 @@ ifneq ($(filter %config,$(MAKECMDGOALS)),) config-build :=3D y endif =20 +include scripts/Kbuild.include + +ARCH=3D$(XEN_TARGET_ARCH) +SRCARCH=3D$(shell echo $(ARCH) | \ + sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g' \ + -e s'/riscv.*/riscv/g') +export ARCH SRCARCH + +# Don't break if the build process wasn't called from the top level +# we need XEN_TARGET_ARCH to generate the proper config +include $(XEN_ROOT)/Config.mk + +# Set ARCH/SUBARCH appropriately. +export TARGET_SUBARCH :=3D $(XEN_TARGET_ARCH) +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 YACC =3D $(if $(BISON),$(BISON),bison) export LEX =3D $(if $(FLEX),$(FLEX),flex) --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848059; cv=none; d=zohomail.com; s=zohoarc; b=HVtbw0E1PBTztTXEO1j6Yvv+ypYjdLgU63ktcab1cJZ4BB8vBiMA5ZKxlkz4lqUP31rTVu0uywKcsC79YK5N61zk9KKMfTXij8iSGoVirBZg7pp1D73sXRW3FVxiPJtjbK4a+Ul23qN9vg63vJs1EDOlno2G1HM5sObV4t2a5oo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848059; 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=cTA+vgDkBlcr701phVxLhE+bUVot6oFotDv/qryhyeE=; b=bpaSxco4AiWfWuOENM71Tr5UfV9EVTe5KUuhMuGTmuToaXYHB0FotBhOdJ6cx1gnjASQ5zlFvMMr7ewHFgCLj9LAuMutePbIQGacyr867rGyizuEkj7JKEa03QlqEoUHG1Gw/wlFrD8JxNiQnGHYNCDl+ATQ1DuunxuZsXM+EdU= 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 1637848059720673.5801210380896; Thu, 25 Nov 2021 05:47:39 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231274.400174 (Exim 4.92) (envelope-from ) id 1mqF5s-0001by-PB; Thu, 25 Nov 2021 13:47:20 +0000 Received: by outflank-mailman (output) from mailman id 231274.400174; Thu, 25 Nov 2021 13:47:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5s-0001Xl-B0; Thu, 25 Nov 2021 13:47:20 +0000 Received: by outflank-mailman (input) for mailman id 231274; Thu, 25 Nov 2021 13:47:17 +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 1mqF0Y-00076i-8S for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:50 +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 6f2dd764-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:48 +0100 (CET) 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: 6f2dd764-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847708; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=frTC8Szw376OF5knYFRkaCp25Mwwo7Caw1me74SfbyE=; b=eHW/BhNWxml/jt6RH5m3k+U53+zYHkdiGd3UqAqgXdm5OnPK0U6rjl1l yU5kLaxy3GxKAcIET3b1G4NGl7H1IzQ8iuZ9dXUU2sm1sdThtS+M0qMe3 NXtZG6QKOmovr3kJVtMg/Pplat9AzjYusOj/XmwjEutLDMLfdBnC4JqD4 k=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 7JGEMlDVKRltdF826oRn/bEmA1kH05M5fUsF7xWh8HSmpatzjlLQ+HqjOn77cfawjp98eyRxY5 MwhlcQRPxLbsdJ39tCLaIaevGoRPK4Vw+sYWlj7Ofkwz2QIDiSXaBSGWZjmzeriwCrsNAeTQhy KM+RMtxUWg9x08ag6qw73puIviwYRPaSHd63pFVwKxBQ3bI5GbiU6x6NMXVSa8cQdN/bfh40rg 4D3h1/kDcpLJw2R2XMT0iGVyrnYh2rJvEb5UJhZCMu6yK/62aF0LPemFb7jMno8J7p6u9fl/Oc o/oTC1iOmB5SiaG1kDO/+Q0v X-SBRS: 5.1 X-MesageID: 58617694 X-Ironport-Server: esa2.hc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r4Ifg4pNZVb71EuVPO+szZ7TmOLa0XNzz9jdKjiIe9EN/pymemYOEj97+jqw7I6 dtZPMbi40wBC7KhPXiHod9JcwFiwZ0H6Xfe8ZI/SwJ+ClA+RDFJ5wH5ndvNhLCJb4wKz7yVr xlRq2dTyUblhG2vFOl5QisLVV8bZr4m9ShTFXV1ZT6AgiF/Ca7yvPZ3X8ZmJtEPqb08pcOYu tFYIq1s9NwUEW+Zk9ncBLGgxLFfmOOD2VjTYnH7OWdnJPaNhWXho7fZQ+cmzwFWZgLfiCf0i +TIOtrzTcVRSgJ8ItzRbf7znVq9sWJEwLB5XlfSI8kVc0LpqdA4Jyv0h/4xAscNNRScmWfKi 1fIWU8V9bvXvos40NjVnqTY/Y2nJPRzQxhBFG7B4LfoaSSDpji/wZVNWfqjdCzGUD+m472rY OhYlqmuMPAOkFtQnZB7FrJnkfA369f1/ucIxQV4BnTbKV+sD+o4cHWB2MBOsIxLx6NY5lTqC h7epIECNOzQas3/EVMXKA40Vci51KkZymvI8PA4AETm/ysrrrCJZlpfYkuXgytHIborbI58m bU9uNQb4hCUgwYxNorUlThd8mmBIyBSU6gjsZ1GUobnhhBylwNHaJ3YTCT3/IuOe5NHNUxze m2Yg6/LhrJ9wEveciVsSSiRjLQF3Zle6gpXyFIiJkiSnouXj/A66xRd7DArQ1kH1R5Aye9yZ jBmOkAdyX9iJNu0aByvh1yRJjw= IronPort-HdrOrdr: A9a23:BgWvhK1sPetrtXEzdz0fKAqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoVj6faUskd2ZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOcOEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58617694" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Konrad Rzeszutek Wilk , Ross Lagerwall , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v8 33/47] build: adding out-of-tree support to the xen build Date: Thu, 25 Nov 2021 13:39:52 +0000 Message-ID: <20211125134006.1076646-34-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848061187100003 Content-Type: text/plain; charset="utf-8" This implement out-of-tree support, there's two ways to create an out-of-tree build tree (after that, `make` in that new directory works): make O=3Dbuild mkdir build; cd build; make -f ../Makefile also works with an absolute path for both. This implementation only works if the source tree is clean, as we use VPATH. This patch copies most new code with handling out-of-tree build from Linux v5.12. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v8: - replace script/mkmakefile by cmd_makefile like it's been done in Linux 5.13. - fix GNU Make version, replace few 0.81 by 3.81. - reorder include header path in CFLAGS ( -I ), to have the $(objtree) paths listed before the $(srctree) paths. This will be usefull later if we allow to build out-of-tree from a dirty source tree. - make use of -iquote - sometime, add -iquote path even when not necessary when building in-t= ree. - extract code movement into a separate patch - make use of the new "$(srcdir)" shortcut - split command line in headers*.chk target into more lines xen/Makefile | 141 +++++++++++++++++++++++++++++++---- xen/Rules.mk | 11 ++- xen/arch/x86/arch.mk | 5 +- xen/arch/x86/boot/Makefile | 6 ++ xen/common/efi/efi_common.mk | 1 + xen/include/Makefile | 11 ++- xen/test/livepatch/Makefile | 2 + xen/xsm/flask/Makefile | 3 +- xen/xsm/flask/ss/Makefile | 1 + 9 files changed, 161 insertions(+), 20 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index bfc96562c5ec..995815e82235 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -1,3 +1,7 @@ +# $(lastword,) for GNU Make older than 3.81 +lastword =3D $(word $(words $(1)),$(1)) +this-makefile :=3D $(call lastword,$(MAKEFILE_LIST)) + # This is the correct place to edit the build version. # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION =3D 4 @@ -19,6 +23,13 @@ export PYTHON ?=3D $(PYTHON_INTERPRETER) =20 export CHECKPOLICY ?=3D checkpolicy =20 +$(if $(filter __%, $(MAKECMDGOALS)), \ + $(error targets prefixed with '__' are only for internal use)) + +# That's our default target when none is given on the command line +PHONY :=3D __all +__all: + # Do not use make's built-in rules and variables MAKEFLAGS +=3D -rR =20 @@ -31,9 +42,6 @@ export CC CXX LD =20 export TARGET :=3D xen =20 -.PHONY: default -default: build - .PHONY: dist dist: install =20 @@ -112,16 +120,88 @@ endif =20 export quiet Q KBUILD_VERBOSE =20 +# $(realpath,) for GNU Make older than 3.81 +realpath =3D $(wildcard $(foreach file,$(1),$(shell cd -P $(dir $(file)) &= & echo "$$PWD/$(notdir $(file))"))) + +ifeq ("$(origin O)", "command line") + KBUILD_OUTPUT :=3D $(O) +endif + +ifneq ($(KBUILD_OUTPUT),) +# Make's built-in functions such as $(abspath ...), $(realpath ...) cannot +# expand a shell special character '~'. We use a somewhat tedious way here. +abs_objtree :=3D $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) = && pwd) +$(if $(abs_objtree),, \ + $(error failed to create output directory "$(KBUILD_OUTPUT)")) + +# $(realpath ...) resolves symlinks +abs_objtree :=3D $(call realpath,$(abs_objtree)) +else abs_objtree :=3D $(CURDIR) -abs_srctree :=3D $(CURDIR) +endif + +ifeq ($(abs_objtree),$(CURDIR)) +# Suppress "Entering directory ..." unless we are changing the work direct= ory. +MAKEFLAGS +=3D --no-print-directory +else +need-sub-make :=3D 1 +endif + +abs_srctree :=3D $(call realpath,$(dir $(this-makefile))) + +ifneq ($(words $(subst :, ,$(abs_srctree))), 1) +$(error source directory cannot contain spaces or colons) +endif + +ifneq ($(abs_srctree),$(abs_objtree)) +# Look for make include files relative to root of kernel src +# +# This does not become effective immediately because MAKEFLAGS is re-parsed +# once after the Makefile is read. We need to invoke sub-make. +MAKEFLAGS +=3D --include-dir=3D$(abs_srctree) +need-sub-make :=3D 1 +endif =20 export abs_srctree abs_objtree +export root-make-done :=3D y + +ifeq ($(need-sub-make),1) + +PHONY +=3D $(MAKECMDGOALS) __sub-make + +$(filter-out $(this-makefile), $(MAKECMDGOALS)) __all: __sub-make + @: + +# Invoke a second make in the output directory, passing relevant variables +__sub-make: + $(Q)$(MAKE) -C $(abs_objtree) -f $(abs_srctree)/Makefile $(MAKECMDGOALS) + +endif # need-sub-make +endif # root-make-done + +# We process the rest of the Makefile if this is the final invocation of m= ake +ifeq ($(need-sub-make),) + +ifeq ($(abs_srctree),$(abs_objtree)) + # building in the source tree + srctree :=3D . + building_out_of_srctree :=3D +else + ifeq ($(abs_srctree)/,$(dir $(abs_objtree))) + # building in a subdirectory of the source tree + srctree :=3D .. + else + srctree :=3D $(abs_srctree) + endif + building_out_of_srctree :=3D 1 +endif =20 -srctree :=3D . objtree :=3D . -export srctree objtree +VPATH :=3D $(srctree) + +export building_out_of_srctree srctree objtree VPATH =20 -export XEN_ROOT :=3D $(CURDIR)/.. +export XEN_ROOT :=3D $(abs_srctree)/.. =20 # To make sure we do not include .config for any of the *config targets # catch them early, and hand them over to tools/kconfig/Makefile @@ -204,9 +284,6 @@ endif =20 export XEN_HAS_CHECKPOLICY :=3D $(call success,$(CHECKPOLICY) -h 2>&1 | gr= ep -q xen) =20 -export root-make-done :=3D y -endif # root-make-done - # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D # Rules shared between *config targets and build targets =20 @@ -214,6 +291,37 @@ PHONY +=3D tools_fixdep tools_fixdep: $(Q)$(MAKE) $(build)=3Dtools tools/fixdep =20 +PHONY +=3D outputmakefile +# Before starting out-of-tree build, make sure the source tree is clean. +# outputmakefile generates a Makefile in the output directory, if using a +# separate output directory. This allows convenient use of make in the +# output directory. +# At the same time when output Makefile generated, generate .gitignore to +# ignore whole output directory + +quiet_cmd_makefile =3D GEN Makefile +cmd_makefile =3D { \ + echo "\# Automatically generated by $(srctree)/Makefile: don't edit"; \ + echo "include $(srctree)/Makefile"; \ + } > Makefile + +outputmakefile: +ifdef building_out_of_srctree + $(Q)if [ -f $(srctree)/.config -o \ + -d $(srctree)/include/config -o \ + -d $(srctree)/include/generated ]; then \ + echo >&2 "***"; \ + echo >&2 "*** The source tree is not clean, please run 'make$(if $(finds= tring command line, $(origin XEN_TARGET_ARCH)), XEN_TARGET_ARCH=3D$(XEN_TAR= GET_ARCH)) distclean'"; \ + echo >&2 "*** in $(abs_srctree)";\ + echo >&2 "***"; \ + false; \ + fi + $(Q)ln -fsn $(srctree) source + $(call cmd,makefile) + $(Q)test -e .gitignore || \ + { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore +endif + ifeq ($(config-build),y) # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D # *config targets only - make sure prerequisites are updated, and descend @@ -229,13 +337,13 @@ filechk_kconfig_allconfig =3D \ .allconfig.tmp: FORCE set -e; { $(call filechk_kconfig_allconfig); } > $@ =20 -config: tools_fixdep FORCE +config: tools_fixdep outputmakefile FORCE $(Q)$(MAKE) $(build)=3Dtools/kconfig $@ =20 # Config.mk tries to include .config file, don't try to remake it %/.config: ; =20 -%config: .allconfig.tmp tools_fixdep FORCE +%config: .allconfig.tmp tools_fixdep outputmakefile FORCE $(Q)$(MAKE) $(build)=3Dtools/kconfig KCONFIG_ALLCONFIG=3D$< $@ =20 else # !config-build @@ -315,6 +423,10 @@ CFLAGS +=3D -flto LDFLAGS-$(CONFIG_CC_IS_CLANG) +=3D -plugin LLVMgold.so endif =20 +ifdef building_out_of_srctree + CFLAGS +=3D -I$(objtree)/include + CFLAGS +=3D -I$(objtree)/arch/$(TARGET_ARCH)/include +endif CFLAGS +=3D -I$(srctree)/include CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include =20 @@ -341,6 +453,8 @@ export CFLAGS_UBSAN =20 endif # need-config =20 +__all: build + main-targets :=3D build install uninstall clean distclean MAP .PHONY: $(main-targets) ifneq ($(XEN_TARGET_ARCH),x86_32) @@ -443,7 +557,7 @@ $(TARGET).gz: $(TARGET) gzip -n -f -9 < $< > $@.new mv $@.new $@ =20 -$(TARGET): FORCE +$(TARGET): outputmakefile FORCE $(Q)$(MAKE) $(build)=3Dtools $(Q)$(MAKE) $(build)=3D. include/xen/compile.h $(Q)$(MAKE) $(build)=3Dinclude all @@ -513,6 +627,7 @@ cloc: done | cloc --list-file=3D- =20 endif #config-build +endif # need-sub-make =20 PHONY +=3D FORCE FORCE: diff --git a/xen/Rules.mk b/xen/Rules.mk index 20dedce06cd8..73d5b82ab2e7 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -37,7 +37,7 @@ SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16,= \ $(foreach r,rel rel.ro,data.$(r).local) =20 # The filename build.mk has precedence over Makefile -include $(firstword $(wildcard $(src)/build.mk) $(src)/Makefile) +include $(firstword $(wildcard $(srcdir)/build.mk) $(srcdir)/Makefile) =20 # Linking # ------------------------------------------------------------------------= --- @@ -328,6 +328,15 @@ existing-targets :=3D $(wildcard $(sort $(targets))) =20 -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) =20 +# Create directories for object files if they do not exist +obj-dirs :=3D $(sort $(patsubst %/,%, $(dir $(targets)))) +# If targets exist, their directories apparently exist. Skip mkdir. +existing-dirs :=3D $(sort $(patsubst %/,%, $(dir $(existing-targets)))) +obj-dirs :=3D $(strip $(filter-out $(existing-dirs), $(obj-dirs))) +ifneq ($(obj-dirs),) +$(shell mkdir -p $(obj-dirs)) +endif + # Declare the contents of the PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends. .PHONY: $(PHONY) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 7cfc9fd3bb1c..554ac341522c 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -62,6 +62,9 @@ ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y) =20 efi-check-o :=3D arch/x86/efi/check.o =20 +# Create the directory for out-of-tree build +$(shell mkdir -p $(dir $(efi-check-o))) + # Check if the compiler supports the MS ABI. XEN_BUILD_EFI :=3D $(call if-success,$(CC) $(CFLAGS) -c $(srctree)/$(efi-c= heck-o:.o=3D.c) -o $(efi-check-o),y) =20 @@ -101,6 +104,6 @@ export EFI_LDFLAGS endif =20 # Set up the assembler include path properly for older toolchains. -CFLAGS +=3D -Wa,-I$(srctree)/include +CFLAGS +=3D -Wa,-I$(objtree)/include -Wa,-I$(srctree)/include =20 ALL_OBJS-y :=3D arch/x86/boot/built_in.o arch/x86/efi/built_in.o $(ALL_OBJ= S-y) diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 5395aae5d57e..04ee9da83333 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -7,6 +7,9 @@ targets +=3D $(head-objs:.S=3D.o) =20 head-objs :=3D $(addprefix $(obj)/, $(head-objs)) =20 +ifdef building_out_of_srctree +$(obj)/head.o: CFLAGS-y +=3D -iquote $(obj) +endif $(obj)/head.o: $(head-objs) =20 $(head-objs:.S=3D.lnk): LDFLAGS_DIRECT :=3D $(subst x86_64,i386,$(LDFLAGS_= DIRECT)) @@ -14,6 +17,9 @@ $(head-objs:.S=3D.lnk): LDFLAGS_DIRECT :=3D $(subst x86_6= 4,i386,$(LDFLAGS_DIRECT)) CFLAGS_x86_32 :=3D $(subst -m64,-m32 -march=3Di686,$(XEN_COMMON_CFLAGS)) $(call cc-options-add,CFLAGS_x86_32,CC,$(EMBEDDED_EXTRA_CFLAGS)) CFLAGS_x86_32 +=3D -Werror -fno-builtin -g0 -msoft-float +ifdef building_out_of_srctree +CFLAGS_x86_32 +=3D -I$(objtree)/include +endif CFLAGS_x86_32 +=3D -I$(srctree)/include =20 # override for 32bit binaries diff --git a/xen/common/efi/efi_common.mk b/xen/common/efi/efi_common.mk index d2845fd6b3c8..d059bb30afa5 100644 --- a/xen/common/efi/efi_common.mk +++ b/xen/common/efi/efi_common.mk @@ -3,6 +3,7 @@ EFIOBJ-$(CONFIG_COMPAT) +=3D compat.o =20 CFLAGS-y +=3D -fshort-wchar CFLAGS-y +=3D -iquote $(srctree)/common/efi +CFLAGS-y +=3D -iquote $(srcdir) =20 $(obj)/%.c: $(abs_srctree)/common/efi/%.c FORCE $(Q)ln -nfs $< $@ diff --git a/xen/include/Makefile b/xen/include/Makefile index f64bc293c7f4..a3977a8bfccd 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -113,7 +113,8 @@ $(obj)/headers99.chk: $(PUBLIC_C99_HEADERS) $(srcdir)/M= akefile $(foreach i, $(filter %.h,$^), \ echo "#include "\"$(i)\" \ | $(CC) -x c -std=3Dc99 -Wall -Werror \ - -include stdint.h $(foreach j, $($(i)-prereq), -include $(j).h) \ + -include stdint.h \ + $(foreach j, $($(patsubst $(srctree)/%,%,$i)-prereq), -include $(j)= .h) \ -S -o /dev/null - \ || exit $$?; echo $(i) >> $@.new;) mv $@.new $@ @@ -127,8 +128,9 @@ $(obj)/headers++.chk: $(PUBLIC_HEADERS) $(srcdir)/Makef= ile $(foreach i, $(filter %.h,$^), \ echo "#include "\"$(i)\" \ | $(CXX) -x c++ -std=3Dgnu++98 -Wall -Werror -D__XEN_TOOLS__ \ - -include stdint.h -include $(src)/public/xen.h \ - $(foreach j, $($(i)-prereq), -include c$(j)) -S -o /dev/null - \ + -include stdint.h -include $(srcdir)/public/xen.h \ + $(foreach j, $($(patsubst $(srctree)/%,%,$i)-prereq), -include c$(j= )) \ + -S -o /dev/null - \ || exit $$?; echo $(i) >> $@.new;) mv $@.new $@ =20 @@ -137,7 +139,8 @@ endif ifeq ($(XEN_TARGET_ARCH),x86_64) .PHONY: lib-x86-all lib-x86-all: - $(MAKE) -C $(obj)/xen/lib/x86 all + @mkdir -p $(obj)/xen/lib/x86 + $(MAKE) -C $(obj)/xen/lib/x86 -f $(abs_srctree)/$(src)/xen/lib/x86/Makefi= le all =20 all: lib-x86-all endif diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index ddb07371315e..c258ab0b5940 100644 --- a/xen/test/livepatch/Makefile +++ b/xen/test/livepatch/Makefile @@ -11,6 +11,8 @@ endif CODE_ADDR=3D$(shell nm --defined $(1) | grep $(2) | awk '{print "0x"$$1}') CODE_SZ=3D$(shell nm --defined -S $(1) | grep $(2) | awk '{ print "0x"$$2}= ') =20 +CFLAGS-y +=3D -iquote $(obj) + extra-y +=3D xen_hello_world.livepatch xen_hello_world-objs :=3D xen_hello_world_func.o xen_hello_world.o note.o = xen_note.o modinfo.o $(obj)/xen_hello_world.o: $(obj)/config.h diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index a99038cb5722..d25312f4fa1c 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -4,7 +4,8 @@ obj-y +=3D flask_op.o =20 obj-y +=3D ss/ =20 -CFLAGS-y +=3D -I$(obj)/include +CFLAGS-y +=3D -iquote $(obj)/include +CFLAGS-y +=3D -I$(srcdir)/include =20 AWK =3D awk =20 diff --git a/xen/xsm/flask/ss/Makefile b/xen/xsm/flask/ss/Makefile index aba1339f3808..ffe92ec19ed6 100644 --- a/xen/xsm/flask/ss/Makefile +++ b/xen/xsm/flask/ss/Makefile @@ -8,4 +8,5 @@ obj-y +=3D services.o obj-y +=3D conditional.o obj-y +=3D mls.o =20 +CFLAGS-y +=3D -iquote $(objtree)/xsm/flask/include CFLAGS-y +=3D -I$(srctree)/xsm/flask/include --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848102; cv=none; d=zohomail.com; s=zohoarc; b=LpH1xDxXgVb+DVcwls1KAt1WtSl+jg1MfllR26NrWvfIQyZb6z9YCwvQ6vvIKf7TotjhKTeVX9YMSreTbmm/VK2lFsni4lc9a/Po00d47h19WszzKR41pdsiEtP2l8ek0LGy0UFyPAdizyDTCgjmFFXncq7iEDfXEV8ymwVPRvg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848102; 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=NmXH6YsyDuX4e72wUxglRfLrfQ6eq+sGdJK7lBEtA2w=; b=IrdZV43Tw5JDe9kvPBXCnnMgp6bowtXP/FVam+Ol7ds2x0KkE/NdVZ6ZGkxemTjXBpdhiQoLH4s7IqNkkEr0tP+sSqNuIU+2aw5e2bZ/zUlmbxuatDY8mg1GP2LLVznC+SqB+4muQ5KPD/W4rq7pGjwCmKM8EaVH+DJBmqefGd0= 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 1637848102142340.16332944102464; Thu, 25 Nov 2021 05:48:22 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231315.400366 (Exim 4.92) (envelope-from ) id 1mqF6X-0002U1-FP; Thu, 25 Nov 2021 13:48:01 +0000 Received: by outflank-mailman (output) from mailman id 231315.400366; Thu, 25 Nov 2021 13:48:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6W-0002PB-Kg; Thu, 25 Nov 2021 13:48:00 +0000 Received: by outflank-mailman (input) for mailman id 231315; Thu, 25 Nov 2021 13:47:58 +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 1mqF0Z-00076i-Go for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:51 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 70706428-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:50 +0100 (CET) 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: 70706428-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847710; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+5GlssNqzezOU4qfx2oQIRykHbCirnnHU6kOEffUfDw=; b=U3Ke+kHiIBtcVeKPXF7u2lZJKOX6HDX06BbfhNDRnOb+uByPdYk0y6KB KoCAkdx2Fl6ONjGcGuBlQcB4AQ7wU8kmaCa1kGscSOdWFxLeOhb3t7QTe Bnth5x0lSwi1+9L04VVVEqwgi2am5iMmoBJX0ypEYdAJLCfOKnuAHjWf1 Y=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: roT4h0hXUysONDDGByW2I8X4yX2zQKPYQYLq90RMxZ1O0lcTeqIMkXmQ8Zsof3sdeRT4rUvyDq Mkm/KnU38wBlNCJxumT81tPVhLYySfWefyDrhPMQHgplYg5H6R4tHbPuox35nm0vC0NSMyc0Zu TOwZWNRE8qk+7ZwlAvU/kZgPxpypVDCU/dq6wBnOGIvJ4+XI7mNisNjj8ojw3Q4IuN37h/acMj kZJrcP6XZFMhB+dLaQnPgvrG4T3jUIrDnaaip6Sabq6j4shJCD46OdEexpbmpLacCX3ZBZPNeg GEJG0zbS4ikWFqVFuFLNlG65 X-SBRS: 5.1 X-MesageID: 59006050 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:DRU4L6g1xBZ/0G24iuslO8GVX161nRcKZh0ujC45NGQN5FlHY01je htvWmuCPqnZZ2D8ct0lOYzgoE8FuJPQnN8wSAo5r3s9ECwb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oAMKRCQ7InQLlbGILes1htZGEk0F0/NtTo5w7Rg29cy3IDja++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4s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o1q03LsgAJA/t3Dyf0 wrKUx4UqfOU+90+8cXThLDCpICsSrMsEk1fFmjdzLC3KSiFoTbznd4eCL6FJGmPWnn19aOuY fRu48v9aPBXzkxXt4dcEqpwyf5s7dXYuLIHnB9vG2/Gbgr3B+o4cGWGx8RGqoZE2qRd5VmtQ kuK99RXZeeJNcfiHAJDLQYpdL3eh/Qdmz2U5vUpOkTqoiRw+ePfA0lVOhCNjg1bLad0b9x5k btw5pZO5lztkAcuP/aHkjtQpjaFIXE3Wqk6so0XXd3wgQ0xx1AeOZHRB0caOn1Uhwmg5qXyH gKpuQ== IronPort-HdrOrdr: A9a23:I8/ecKilnECIIwrEl8fB6sU4uXBQX1913DAbv31ZSRFFG/FwyP re/sjzhCWE6wr5BktBpTnZAtj/fZoYz+8G3WBjB8bSYOCGggWVxe5ZnPHfKlHbakrDH6tmpN hdmstFeZLN5DpB/LvHCWCDer5KqrbngcXY4dsy100AcegpUdAd0+4QMHfZLqQcfng+OXNNLu vm2iMxnUvZRZ14VLXcOlA1G8LEqtH3ipSjRRIdHRYo5Cmi5AnYqYLSIlyz2BoTbi1I+Kwl+2 TeiQD1j5/T881T/iWslVM7oq4mwOcIBbN4dYCxo/lQDg+pphejZYxnVbHHlDcpoNu34FJvq9 XIqwdIBbU515uEFFvZnTLdny3blBo+4X7rzlGVxVH5p9bieT48A81dwapEbxrw8SMbzYBB+Z MO+1jcm4tcDBvGkii4zcPPTQtWmk29pmdnufIPjkZYTZAVZNZq3NIiFXtuYcc99R/Bmdwa+a hVfZzhDc9tAAmnhqXizzZSKN/FZAV6Iv7JeDlNy5+oO/4/pgE986JS/r1uop46zuNId3Gfj9 60dpiA3Is+PfP+TZgNQtvpEvHHU1Akt3r3QS+vyWqOLtBwB5o7w6SHqondotvaI6AgzJw8no nMWlIdtWNaQTOoNSS+5uwDzvmWehTJYd3E8LAo26RE X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="59006050" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 34/47] build: add %.E targets Date: Thu, 25 Nov 2021 13:39:53 +0000 Message-ID: <20211125134006.1076646-35-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848103313100001 Content-Type: text/plain; charset="utf-8" I guess it's easier to remember that %.E does "$(CC) -E" or "$(CPP)". Suggested-by: Andrew Cooper Signed-off-by: Anthony PERARD --- xen/Makefile | 4 ++-- xen/Rules.mk | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 995815e82235..e39a6f82859a 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -609,10 +609,10 @@ cscope: _MAP: $(NM) -n $(TARGET)-syms | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|= \(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map =20 -%.o %.i %.s: %.c tools_fixdep FORCE +%.o %.i %.s %.E: %.c tools_fixdep FORCE $(Q)$(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 -%.o %.s: %.S tools_fixdep FORCE +%.o %.s %.E: %.S tools_fixdep FORCE $(Q)$(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 %/: tools_fixdep FORCE diff --git a/xen/Rules.mk b/xen/Rules.mk index 73d5b82ab2e7..745d892d0707 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -287,6 +287,11 @@ $(obj)/%.s: $(src)/%.c FORCE $(obj)/%.s: $(src)/%.S FORCE $(call if_changed_dep,cpp_s_S) =20 +$(obj)/%.E: $(src)/%.c FORCE + $(call if_changed_dep,cpp_i_c) +$(obj)/%.E: $(src)/%.S FORCE + $(call if_changed_dep,cpp_s_S) + # Linker scripts, .lds.S -> .lds quiet_cmd_cpp_lds_S =3D LDS $@ cmd_cpp_lds_S =3D $(CPP) -P $(call cpp_flags,$(a_flags)) -DLINKER_SCRIPT -= MQ $@ -o $@ $< --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848053; cv=none; d=zohomail.com; s=zohoarc; b=JolRwcKUw/OYmj98mDL1acTi/YCNrweb/8k9TdoynSxPx8/12NIRo8+5gm5zzSMvS++ejRaCo+UDvi0zy0btaMx1TrNyaOinvZoPE/fpr148IegDrHcSKjBLAAxFNlfJo2R9jEtEUuSP/9uq8shRBPdemtIJnIKH3f0SCFpZQ2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848053; 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=6ukpEnZuX9XFMHTuSLYTZQnXaREWoxm5XiR1g+SIIkM=; b=giVc4AoUa/J867vviu1QD60vKuSnd3VbdSyriI+k1tBCYp4LrzEDiM+YA+zBNfW2up0FEWRJnyNW4Nx65FTa9OYCgBbPHmHAas4bg2/m/mZzjRZxW1+rGcvCBo0aA8GXei+lh3RIC4tVaWmOESUZk2zLCfz5hlCZfPqsGY8ASGU= 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 1637848053929763.1100195722402; Thu, 25 Nov 2021 05:47:33 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231272.400170 (Exim 4.92) (envelope-from ) id 1mqF5s-0001NH-7U; Thu, 25 Nov 2021 13:47:20 +0000 Received: by outflank-mailman (output) from mailman id 231272.400170; Thu, 25 Nov 2021 13:47: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 1mqF5r-0001Ju-IS; Thu, 25 Nov 2021 13:47:19 +0000 Received: by outflank-mailman (input) for mailman id 231272; Thu, 25 Nov 2021 13:47:17 +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 1mqF0b-00076i-Vu for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:54 +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 71e503af-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:53 +0100 (CET) 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: 71e503af-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847712; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8lx/+jmrSiPW0TNI8HSQ6GVzRfM87w+Yl5TJDEX54CU=; b=ChiTAraC+gHUTVdnejHn5Q/4+0WZ9dUJ++QIauSyNUZQklOUmDtfRg1J ez+vGXTlwmQf3iPZjPK7U79HYR7ryEQjQbMvoxe6aiMHB0YS/jGmPizoH L2/rvu+KF1YVRb3mxuj5do+fYUkV6NuPYdIZg2+wkmCYASQ3600JFkh8f o=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: QCGyXCny18waiPeNFNdUK2P7IBiw+R9MtneBAJBU/vvid/7vySpZkENhfvopyfDJurMhWxGQLp IiwXw8RgdvAP2cRHu7uBnkOFR8L9OFT8yB4+jtbvuC3X+TcRjZF9vKxig9xn+BB2BAmOkOK+YX v2maK15/WY/GZtFEHToXkF1UVyt40dhhyF1C5cfIwmjdxQMZnaR3TD/gT3YL2EMjNTP4kLwhKs Cz3CDajNBz6qCSOnaX6yeZ+mzK73Oh+69H7SBCFk7ILhdHwab9kdhzMu3TFGZ/OdqeeQzRvsX9 eA07HWnmqI9L+GKk7o7aoMMD X-SBRS: 5.1 X-MesageID: 58637880 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:zScv/qI+g/1ul3pcFE+RHpIlxSXFcZb7ZxGr2PjKsXjdYENSg2ZTm GVNDDuAMq7cYmP0ct1yOtjk8kMPuZDRx4dqHgplqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUZUideSc+EH140Es5xrZj6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB2noP58w Y1opaaMZiA0GZT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41wT+Riwa4kvoa9orZbykJvHWnRbkTtAbRleyHU0c5Kv6xL57lYpQrpB R7fpogEYe2EaJH/DVocBAs5deDSh/gblw7b4ekxPEintjR8+6CKUBkKMhSB4MCHwGCZ7G/xL T8dhfMr IronPort-HdrOrdr: A9a23:3x3n2q4SBz0OXktGywPXwU2BI+orL9Y04lQ7vn2ZFiYlEPBwxv re/8jziyWVtN9IYgBfpTlEAtjzfZquz+8F3WBxB9mftWbdyRGVxe1ZnOzfKnjbalLDH41mpO hdmspFeaDN5DFB5K6QimbYYrNQpOVr6JrFuQ6d9QYQcegDUdAi0+4TMHfjLqQCfng8OXNPLu vl2iMonUvHRV0nKu68C3U5Qe6Gg9HQjprpbT4qbiRXqTWmvHeD7rP3Lgaf5wwZWT9U27sumF K10zAR0p/T8c1ThyWsj1M6IPxt6Zfc4+oGIPbJptkeKz3qhArtTIN9W4eatDRwm+2r4EZCqq iGn/91Vf4f11rhOkWO5Tf90Qjp1zgjr1X4z0WDvHflqcvlABonFston+tiA0rkwntlmOs5/L NA3mqfuZYSJwjHhj7B69/BUAwvvlaooEAljfUYgxVkINUjgYdq3NwiFX5uYcs99WPBmd0a+d BVfZvhDSNtAAynh3OwhBgm/DXjZAV8b0S7qo5rgL3R79EcpgEI86Ii/r1qop/bnKhND6Wsr9 60QZiAtIs+CPP+PpgNXdvot6OMeyHwqSylChPlHbwRfJt3cU4l7aSHu4kd5OakfoEFxpp3mJ mpaiIeiYcCQTOmNSTV5uw/zvnkehTLYQjQ X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58637880" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Doug Goldstein Subject: [XEN PATCH v8 35/47] RFC, no-VPATH: Kconfig: tell where Kconfig files are Date: Thu, 25 Nov 2021 13:39:54 +0000 Message-ID: <20211125134006.1076646-36-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848055397100003 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD deps_config is the list of all Kconfig files, we need to say that they are in the source tree, or make isn't going to find them without VPATH and will try to rebuild 'syncconfig' over and over again. Signed-off-by: Anthony PERARD --- xen/tools/kconfig/confdata.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/tools/kconfig/confdata.c b/xen/tools/kconfig/confdata.c index a69250c91355..4f9139d055be 100644 --- a/xen/tools/kconfig/confdata.c +++ b/xen/tools/kconfig/confdata.c @@ -971,6 +971,7 @@ static int conf_write_dep(const char *name) else fprintf(out, "\t%s\n", file->name); } + fprintf(out, "deps_config :=3D $(addprefix $(srctree)/, $(deps_config))\n= "); fprintf(out, "\n%s: \\\n" "\t$(deps_config)\n\n", conf_get_autoconfig_name()); =20 --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848051; cv=none; d=zohomail.com; s=zohoarc; b=Sugpyompp+Rd8JBbOe85K5l1Zz6WEzNAUa5Du1HSZmDmBzDXfP/7yckXlNpw8THzcONY3wCJn0jXH3boTaDxBgbfdxwu1+yc2xH75nKUYcC2FmW15rYutIl8J52YVI45Y+U1zEcYVjfKKAPVUrYSh2T5wEeCtWpkAVL0yXGPfwg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848051; 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=5UWaAKEs2ta4F7lKo2gRBKKXj37q6V84XyqCmQBgyx8=; b=HADn118+iBsy5/h78vHc4YHk0ewHJcRR/wjknjMcP8uvMKIlmONcuAEi5UpmH4yZ9sgf0ajiKjevXZH7ea5hwbMWSERidaSl/+BUK4L+Wd5AnQKtUmHqG+sxviJZFz5lQ3D3ichoo1AfioTMWJDwYtCZ8xFuTAxKlEOP3OITfT4= 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 1637848051702789.6565740687847; Thu, 25 Nov 2021 05:47:31 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231261.400145 (Exim 4.92) (envelope-from ) id 1mqF5p-0000ub-ML; Thu, 25 Nov 2021 13:47:17 +0000 Received: by outflank-mailman (output) from mailman id 231261.400145; Thu, 25 Nov 2021 13:47:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5p-0000uK-H6; Thu, 25 Nov 2021 13:47:17 +0000 Received: by outflank-mailman (input) for mailman id 231261; Thu, 25 Nov 2021 13:47:16 +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 1mqF0a-00076i-Qx for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:52 +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 71cf687e-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:51 +0100 (CET) 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: 71cf687e-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847711; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CWsp0MdhX8GJ4/siL8IM7kIar9Uw1eonEXIe+1nIRyU=; b=ht23CctioGJ7ppfpPRbknDiAVvt7ag2FNhmc75XxdJ04FNiDzAQWP1Lu T2QENAuuMNpP5m4eIT5++XnCXSnp1VVKkVH+zTLfKMED6dkUYdL3BdhWi Q7UEdHApjNwP5fEnhBBv4mAQgMScWcW+NziOOW4WCo6BwEfJcgL41/Q3w M=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: k86/nwiWaQBbq9FQommKA4r3+yJbRPRDPopy1ke3GJfAVKukIirtNoXT9N3PzdTZLr/PzPySRA PWhzTok7FnVKLDJS/khqINrtpcUacz3DLDtnBmHGuM5JJBUC4VgU+PqrDQNJ+MnFLTT0iBhGMx +oIRbQSgzArtPtobuOllAs27BysTRkdbyDocTMiMPT2F3XpCYE7tELQOv4iBu2ctFmn3hJqR4N Jl/bcOpQoddsY4sfRPD7SNHZnHEEFxviE2c6jQ/L3A9i89hGLILTsfP/n26hDzFRJ/vVwoM+C/ GANas4ZRAZLiEJ6etKX6h0UT X-SBRS: 5.1 X-MesageID: 58617700 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:h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qNFLdjjn7xETXPjLliCeTcbbSiIOJY3rI6a5LWoJd9M3kqJLuP3P+ 33hCEZUxECm3S/MKBmQa2AlY7TqBM4toXU+NC0qHFCpx3l8Ptr/sPZBL8M6Les96ehu7f9oV P1ZKc+ONetCF2bc8DMHYJij8IE7LEa3hRiDNjaOaSQke8IyXBTA/9LpJ1O99CQHAietm9E5p rmsilHSTZYZHlwwB8fKcvO/iVi2uCFFyu51WkLJJPhVeVntr9c2e3Cg0KdvLphVexvZxzac2 wKHOjsipLHA890v7d3EpaGYtIP1QeFwKVVXQjvA5rGsOCiEomf6md1cUPyFdCz2XX/v/Pnwf v1cyvzxPaFVnFtOtIYgQb9nwbhnuonqrr5eiA9lAG/KfxKgDbY5eiuK2sxGt6tswL5FuFTpB hLTq4cCYbjZatn4FFMxJRY+arXR3P4ZrTDe8PApLRio/yRw5reGDR1fMhTkZPax91ep3FfJG dschfM= IronPort-HdrOrdr: A9a23:Qr39da/9jgfndjQAPltuk+DgI+orL9Y04lQ7vn2YSXRuHPBw8P re+sjztCWE8Ar5N0tBpTntAsW9qDbnhPtICOoqTNCftWvdyQiVxehZhOOIqVDd8m/Fh4pgPM 9bAtFD4bbLbGSS4/yU3ODBKadD/OW6 X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58617700" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Doug Goldstein Subject: [XEN PATCH v8 36/47] RFC, no-VPATH: Kconfig: only ready auto.conf from objtree Date: Thu, 25 Nov 2021 13:39:55 +0000 Message-ID: <20211125134006.1076646-37-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848053111100001 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD zconf_fopen() will open file in $srctree if the file isn't in $objtree. This is an issue for "auto.conf" as it could be in the source tree if it is dirty. With "auto.conf" read from the source tree, kconfig will not properly set the file associated with a CONFIG_* properly in "include/config/" and instead only touch the files that correspond to new CONFIG_* option that were not set in the "auto.conf" found in the source tree. That might not be an issue, but it is probably better to have a populated "include/config/" directory in sync with "include/config/auto.conf". The second that read from conf_get_configname() would read ".config" from the source directory which is also not wanted in Xen. Signed-off-by: Anthony PERARD --- xen/tools/kconfig/confdata.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/tools/kconfig/confdata.c b/xen/tools/kconfig/confdata.c index 4f9139d055be..805d4c3e5636 100644 --- a/xen/tools/kconfig/confdata.c +++ b/xen/tools/kconfig/confdata.c @@ -357,12 +357,17 @@ int conf_read_simple(const char *name, int def) int i, def_flags; =20 if (name) { - in =3D zconf_fopen(name); + if (def =3D=3D S_DEF_AUTO) { + /* only open include/config/auto.conf in objtree */ + in =3D fopen(name, "r"); + } else { + in =3D zconf_fopen(name); + } } else { struct property *prop; =20 name =3D conf_get_configname(); - in =3D zconf_fopen(name); + in =3D fopen(name, "r"); if (in) goto load; sym_add_change_count(1); --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848054; cv=none; d=zohomail.com; s=zohoarc; b=FBupK7os0yc4dADmqFZMIeD8SHM+fTwmzp7/uYRF3u92OD6b4FWSxe54KTM5F7uOJLg7AshCNHNUhs5TqF8DwE7OZwXweCknTXBMdoXTH0fH5Q1UMxsImX5gLqw5iXxmeFr0jvHmf9cCOEeznNYR2SZMmVDX4vX/Wicfa9LiR7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848054; 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=fde5AorOcYdbKyAUBH2z/D3M8R0k/biiHWO25pvBgKo=; b=GtfGirUnRIsH7obsT/sd/CzXjtyFSMBXF7LVXiQdQ8tJ+QegV0ESTcVZVJWK7Yherv7TZfrA54qYnFSDMo4uoW9DkHkqqeaklsHoaZgs16HiBllYxwLD4l4qlBmJ7jc9OdA0Z6WHXIO3EVmqD4Sd3NQbzeelKa+JE2CmUr0VcIU= 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 163784805428821.65266937411934; Thu, 25 Nov 2021 05:47:34 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231262.400150 (Exim 4.92) (envelope-from ) id 1mqF5q-0000xQ-7u; Thu, 25 Nov 2021 13:47:18 +0000 Received: by outflank-mailman (output) from mailman id 231262.400150; Thu, 25 Nov 2021 13:47:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5p-0000wx-T7; Thu, 25 Nov 2021 13:47:17 +0000 Received: by outflank-mailman (input) for mailman id 231262; Thu, 25 Nov 2021 13:47:16 +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 1mqF0d-0007NX-UB for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:56 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 72fe5a02-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:54 +0100 (CET) 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: 72fe5a02-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847714; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7q2b6ioZxw6miBARrIxzLFbv4WP2dzhNSHzrlYKQwac=; b=bG8QDzpd4HwPDCkJbFiGlif7FgjQUAJD8a7CQ9L6PK8UrUm0ezcMpbhf lZb0HJus1Fp4OKKRvhGKLw7po8oQ2UpOGoVsA1cXOGbiUnE+K2+Wyw862 jUUejYejMLzVXku0pEYaKZCy8V9IHVJBEp6ygakyYKqSmxOh6eP2tg39H A=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: NAgK5Mclx2aJ6A4HFAKnMSqzl1JB86WHq5Wx/QDwFu7MJso88dYoOlV1VxrcHwzMUQdBMyAeRz MJyKhgUdkoTC/CHb7tueIhpvW+42Yy7mVRYWWiNxeh8u95TMqt6ak4EhVer4ZSZSnJSQkhkGv8 83sxOAdV/tucq5HdIkKmZ2hK02TLP4MD4Z/jPYic1b/Swe1RF0Ow21xkooThL8kTNIMK2aKlS4 pz+idZe/jbIR5mkiFBJZNR/pMiz2Pn7pfkRsHfWsDtA9C4lJMwChQWkZJ7TnX4mO7hTRVbc/XU x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93Z5ycCl/GI+THZuhf8NIcmX3SJXFXblByCnGbJt4wXrGAikLskJ bCQetu2AHARBMxPlWTtGLhCgO97l3pglAs/oKwXKDz9j9KjiIO9E+9ZYDNikMhlhE97nOkl2 4kGbJbbo/mueOb/fjPW4eYuwaMidhAG6WTNg5UPLIare1M+cEl4UqO56e5xKuRNwvUO/s+Vr y7VZ6Ot4Aem7ZExAV7RMS4LhXKGdcsXkE/XygRwZwv1gCZ6Pt70hErdHrNuFYQaGCVY5aYcZ 5E4lw+oW5yjkxzLpGYQa4fTtotneEj5jA6CJXP9MjM+Y4RhV0rC/dq9Jlnj8ywHDyyWs8oio uL/ilOHEMRbHwkyXtzLbP+Pzk+quSRPkuxFQEaVcMJYf1/h8dY2JnWp3OM3OcwFNT7K2iCei 1SNGR4dqOSU+901/dDFiLqqtYCsF+ciTENWE3OCteS9NDXA/3rlyohFCb7acTfYXWLy2aOje eQKkK2sbKxZxA5H6tMuHaxqwKQy48rUi4Vblgk0Tm/Wa1mLC697JiXU18d4qaAQlKRSvhG7W xzT94ACa6mJIs7sDHUYOBEhMraYzfgRlzTfsaY1LUH96HMl9baLSxwPbRyFiSgbJ7ppKoI1h +wmvZdOuQC4jxMrNPeAjzxVqDvQfiBRDf1/u8FIGpLvhyoq1kpGMM7VBSLB6Z2Sb8lBbxsxK TiOiaue37lRyyIuqZbo+aQhCQaFuakzhQ== IronPort-HdrOrdr: A9a23:aRF+L6rgNwlk7kZj8a/dtgoaV5oteYIsimQD101hICG8cqSj+P xG+85rsiMc6QxhIU3I9urgBEDtex7hHNtOkOss1NSZLW3bUQmTTL2KhLGKq1aLJ8S9zJ856U 4JSdkZNDSaNzZHZKjBjDVQa+xQo+W6zA== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634177" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Andrew Cooper , "George Dunlap" , Ian Jackson , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH v8 37/47] RFC, no-VPATH: build: remove --include-dir option from MAKEFLAGS Date: Thu, 25 Nov 2021 13:39:56 +0000 Message-ID: <20211125134006.1076646-38-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848055545100005 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD File "include/config/auto.conf" and "include/config/auto.conf.cmd" should be included from the build tree even if they are present in the source tree. Avoiding to use make's command line option --include-dir will have make include the right "auto.conf" file. But that mean we now need to specify $(srctree) for all other Makefile we include. Signed-off-by: Anthony PERARD --- xen/Makefile | 11 +---------- xen/Rules.mk | 2 +- xen/common/libfdt/Makefile | 2 +- xen/scripts/Makefile.clean | 2 +- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index e39a6f82859a..fbce0f6771fb 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -153,15 +153,6 @@ ifneq ($(words $(subst :, ,$(abs_srctree))), 1) $(error source directory cannot contain spaces or colons) endif =20 -ifneq ($(abs_srctree),$(abs_objtree)) -# Look for make include files relative to root of kernel src -# -# This does not become effective immediately because MAKEFLAGS is re-parsed -# once after the Makefile is read. We need to invoke sub-make. -MAKEFLAGS +=3D --include-dir=3D$(abs_srctree) -need-sub-make :=3D 1 -endif - export abs_srctree abs_objtree export root-make-done :=3D y =20 @@ -225,7 +216,7 @@ ifneq ($(filter %config,$(MAKECMDGOALS)),) config-build :=3D y endif =20 -include scripts/Kbuild.include +include $(srctree)/scripts/Kbuild.include =20 ARCH=3D$(XEN_TARGET_ARCH) SRCARCH=3D$(shell echo $(ARCH) | \ diff --git a/xen/Rules.mk b/xen/Rules.mk index 745d892d0707..45d2b72158b8 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -104,7 +104,7 @@ noubsan-y :=3D $(addprefix $(obj)/,$(noubsan-y)) # $(sort ...) is used here to remove duplicated words and excessive spaces. hostprogs-y :=3D $(sort $(hostprogs-y)) ifneq ($(hostprogs-y),) -include scripts/Makefile.host +include $(srctree)/scripts/Makefile.host endif =20 # subdir-builtin may contain duplications. Use $(sort ...) diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile index 75aaefa2e37f..8d484063753b 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -1,4 +1,4 @@ -include $(src)/Makefile.libfdt +include $(srcdir)/Makefile.libfdt =20 SECTIONS :=3D text data $(SPECIAL_DATA_SECTIONS) OBJCOPYFLAGS :=3D $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$= (s)) diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index 53f7a76b3075..fa5f332e49a0 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -12,7 +12,7 @@ clean:: =20 include $(srctree)/scripts/Kbuild.include =20 -include $(src)/Makefile +include $(srcdir)/Makefile =20 # Figure out what we need to clean from the various variables # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848106; cv=none; d=zohomail.com; s=zohoarc; b=Ssjhf0rB981Aoq48JVyOcnepuhRo8DA4HsfdFSZebsLcbDPpLTkc8WzhUhZ/9O8P3buD/UOWqX8MUWrwN5JAxBTS6cQkmoC/ld0lMh6Na+3Fjr4nfqpshJKcgFxH1qZ0NmT+IZ2hocLbp30NyxwZC5DpXG42gj06Tf2aii/rKBU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848106; 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=HtxQVDJgj+XPkQ0P+E1Y4iE4uENPTX8U4YtJJd99mco=; b=hi0Mco0a7jMI7ulQxEUYk0TEKNpKrUhabE0NLU/jEaREeMJg2DcUqvLIPLEJT5PwcXTrxexc+zC9Xy+mAfiK2IVBpiz5m9E0rF0sN0/j8OVjBp0t34yXr6KAvwjXisYG4mXEw2EeJho+C9aROlhMQOZXxuPezUMjrJZUjhVHXbM= 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 1637848106777112.32584024957828; Thu, 25 Nov 2021 05:48:26 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231322.400409 (Exim 4.92) (envelope-from ) id 1mqF6h-0004fQ-EF; Thu, 25 Nov 2021 13:48:11 +0000 Received: by outflank-mailman (output) from mailman id 231322.400409; Thu, 25 Nov 2021 13:48:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6g-0004YY-5w; Thu, 25 Nov 2021 13:48:10 +0000 Received: by outflank-mailman (input) for mailman id 231322; Thu, 25 Nov 2021 13:48:08 +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 1mqF0g-00076i-37 for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:58 +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 74b08918-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:41:56 +0100 (CET) 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: 74b08918-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847716; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=84a5ACH3vmAplQpyvArcPgKE++VGrDYmdqQ8lZna65Y=; b=XmnRi66U57wVpGy2N8C9O9ZpxM/AHVygD4tWwRDQ+hBKZlJR1z4fmnDh vbNpk7VuoPqLK/y4hxC5cu34HXUThQiU7RqMuCNyYS3nvWSUDCDjWHMq1 E4+xMIISi9sHsB6lXgEeKlbJ0U0ZLIohjC39jfdekZpypOiCRBO0gjRrV o=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: NHGO3+FqzGWJR3qr8dh1z4wByAV6s5GnusgFPkohcA9qRdv6G1CfCKN7Z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E8Qr5N0tApTntAsS9qDbnhPxICOoqTNOftWvd2FdARbsKheCJ/9SjIVyaygc079 YHT0EUMrPN5DZB4foSmDPIcOod/A== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58617708" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Andrew Cooper , "George Dunlap" , Ian Jackson , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Doug Goldstein Subject: [XEN PATCH v8 38/47] WIP, no-VPATH: rework Makefile.host Date: Thu, 25 Nov 2021 13:39:57 +0000 Message-ID: <20211125134006.1076646-39-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848108478100001 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD Allow to build 'defconfig' target without VPATH in out-of-tree build Signed-off-by: Anthony PERARD --- xen/scripts/Makefile.host | 34 +++++++++++++++++++++++++--------- xen/tools/kconfig/Makefile | 12 +++++++++--- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/xen/scripts/Makefile.host b/xen/scripts/Makefile.host index d6c358095ee8..d083c6dbca76 100644 --- a/xen/scripts/Makefile.host +++ b/xen/scripts/Makefile.host @@ -8,7 +8,7 @@ target-stem =3D $(basename $(patsubst $(obj)/%,%,$@)) quiet_cmd_flex =3D LEX $@ cmd_flex =3D $(LEX) -o$@ -L $< =20 -$(obj)/%.lex.c: $(src)/%.l FORCE +$(obj)/%.lex.c: $(srctree)/$(src)/%.l FORCE $(call if_changed,flex) =20 # YACC @@ -16,7 +16,7 @@ $(obj)/%.lex.c: $(src)/%.l FORCE quiet_cmd_bison =3D YACC $(basename $@).[ch] cmd_bison =3D $(YACC) -o $(basename $@).c --defines=3D$(basename $@)= .h -t -l $< =20 -$(obj)/%.tab.c $(obj)/%.tab.h: $(src)/%.y FORCE +$(obj)/%.tab.c $(obj)/%.tab.h: $(srctree)/$(src)/%.y FORCE $(call if_changed,bison) =20 # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -56,6 +56,11 @@ host-cmulti :=3D $(foreach m,$(__hostprogs),\ =20 # Object (.o) files compiled from .c files host-cobjs :=3D $(sort $(foreach m,$(__hostprogs),$($(m)-objs))) +# from generated .c files +host-cobjs-generated :=3D $(sort $(foreach m,$(__hostprogs),$($(m)-objs-ge= nerated))) +ifndef building_out_of_srctree +host-cobjs +=3D $(host-cobjs-generated) +endif =20 # C++ code # C++ executables compiled from at least one .cc file @@ -72,6 +77,9 @@ host-cxxshobjs :=3D $(sort $(foreach m,$(host-cxxshlib),$= ($(m:.so=3D-objs)))) host-csingle :=3D $(addprefix $(obj)/,$(host-csingle)) host-cmulti :=3D $(addprefix $(obj)/,$(host-cmulti)) host-cobjs :=3D $(addprefix $(obj)/,$(host-cobjs)) +ifdef building_out_of_srctree +host-cobjs-generated :=3D $(addprefix $(obj)/,$(host-cobjs-generated)) +endif host-cxxmulti :=3D $(addprefix $(obj)/,$(host-cxxmulti)) host-cxxobjs :=3D $(addprefix $(obj)/,$(host-cxxobjs)) host-cshlib :=3D $(addprefix $(obj)/,$(host-cshlib)) @@ -104,25 +112,30 @@ hostcxx_flags =3D -Wp,-MD,$(depfile) $(_hostcxx_flag= s) quiet_cmd_host-csingle =3D HOSTCC $@ cmd_host-csingle =3D $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $= < \ $(HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) -$(host-csingle): $(obj)/%: $(src)/%.c FORCE +$(host-csingle): $(obj)/%: $(srctree)/$(src)/%.c FORCE $(call if_changed_dep,host-csingle) =20 # Link an executable based on list of .o files, all plain c # host-cmulti -> executable quiet_cmd_host-cmulti =3D HOSTLD $@ cmd_host-cmulti =3D $(HOSTCC) $(HOSTLDFLAGS) -o $@ \ - $(addprefix $(obj)/, $($(target-stem)-objs)) \ + $(foreach o,objs objs-generated, \ + $(addprefix $(obj)/, $($(target-stem)-$(o)))) \ $(HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) $(host-cmulti): FORCE $(call if_changed,host-cmulti) -$(call multi-depend, $(host-cmulti), , -objs) +$(call multi-depend, $(host-cmulti), , -objs -objs-generated) =20 # Create .o file from a single .c file # host-cobjs -> .o quiet_cmd_host-cobjs =3D HOSTCC $@ cmd_host-cobjs =3D $(HOSTCC) $(hostc_flags) -c -o $@ $< -$(host-cobjs): $(obj)/%.o: $(src)/%.c FORCE +$(host-cobjs): $(obj)/%.o: $(srctree)/$(src)/%.c FORCE $(call if_changed_dep,host-cobjs) +ifdef building_out_of_srctree +$(host-cobjs-generated): $(obj)/%.o: $(obj)/%.c FORCE + $(call if_changed_dep,host-cobjs) +endif =20 # Link an executable based on list of .o files, a mixture of .c and .cc # host-cxxmulti -> executable @@ -138,14 +151,14 @@ $(call multi-depend, $(host-cxxmulti), , -objs -cxxob= js) # Create .o file from a single .cc (C++) file quiet_cmd_host-cxxobjs =3D HOSTCXX $@ cmd_host-cxxobjs =3D $(HOSTCXX) $(hostcxx_flags) -c -o $@ $< -$(host-cxxobjs): $(obj)/%.o: $(src)/%.cc FORCE +$(host-cxxobjs): $(obj)/%.o: $(srctree)/$(src)/%.cc FORCE $(call if_changed_dep,host-cxxobjs) =20 # Compile .c file, create position independent .o file # host-cshobjs -> .o quiet_cmd_host-cshobjs =3D HOSTCC -fPIC $@ cmd_host-cshobjs =3D $(HOSTCC) $(hostc_flags) -fPIC -c -o $@ $< -$(host-cshobjs): $(obj)/%.o: $(src)/%.c FORCE +$(host-cshobjs): $(obj)/%.o: $(srctree)/$(src)/%.c FORCE $(call if_changed_dep,host-cshobjs) =20 # Compile .c file, create position independent .o file @@ -155,7 +168,7 @@ $(host-cshobjs): $(obj)/%.o: $(src)/%.c FORCE # host-cxxshobjs -> .o quiet_cmd_host-cxxshobjs =3D HOSTCXX -fPIC $@ cmd_host-cxxshobjs =3D $(HOSTCXX) $(hostcxx_flags) -fPIC -c -o $@ $< -$(host-cxxshobjs): $(obj)/%.o: $(src)/%.c FORCE +$(host-cxxshobjs): $(obj)/%.o: $(srctree)/$(src)/%.c FORCE $(call if_changed_dep,host-cxxshobjs) =20 # Link a shared library, based on position independent .o files @@ -180,3 +193,6 @@ $(call multi-depend, $(host-cxxshlib), .so, -objs) =20 targets +=3D $(host-csingle) $(host-cmulti) $(host-cobjs)\ $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) $(host= -cxxshlib) $(host-cxxshobjs) +ifdef building_out_of_srctree +targets +=3D $(host-cobjs-generated) +endif diff --git a/xen/tools/kconfig/Makefile b/xen/tools/kconfig/Makefile index b7b9a419ad59..c2ecf4b36652 100644 --- a/xen/tools/kconfig/Makefile +++ b/xen/tools/kconfig/Makefile @@ -146,8 +146,9 @@ help: =20 # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D # object files used by all kconfig flavours -common-objs :=3D confdata.o expr.o lexer.lex.o parser.tab.o preprocess.o \ +common-objs :=3D confdata.o expr.o preprocess.o \ symbol.o +common-objs-generated :=3D lexer.lex.o parser.tab.o =20 $(obj)/lexer.lex.o: $(obj)/parser.tab.h HOSTCFLAGS_lexer.lex.o :=3D -I $(srctree)/$(src) @@ -156,10 +157,12 @@ HOSTCFLAGS_parser.tab.o :=3D -I $(srctree)/$(src) # conf: Used for defconfig, oldconfig and related targets hostprogs-y +=3D conf conf-objs :=3D conf.o $(common-objs) +conf-objs-generated :=3D $(common-objs-generated) =20 # nconf: Used for the nconfig target based on ncurses hostprogs-y +=3D nconf nconf-objs :=3D nconf.o nconf.gui.o $(common-objs) +nconf-objs-generated :=3D $(common-objs-generated) =20 HOSTLDLIBS_nconf =3D $(shell . $(obj)/nconf-cfg && echo $$libs) HOSTCFLAGS_nconf.o =3D $(shell . $(obj)/nconf-cfg && echo $$cflags) @@ -172,6 +175,7 @@ hostprogs-y +=3D mconf lxdialog :=3D $(addprefix lxdialog/, \ checklist.o inputbox.o menubox.o textbox.o util.o yesno.o) mconf-objs :=3D mconf.o $(lxdialog) $(common-objs) +mconf-objs-generated :=3D $(common-objs-generated) =20 HOSTLDLIBS_mconf =3D $(shell . $(obj)/mconf-cfg && echo $$libs) $(foreach f, mconf.o $(lxdialog), \ @@ -183,6 +187,7 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf= -cfg hostprogs-y +=3D qconf qconf-cxxobjs :=3D qconf.o qconf-objs :=3D images.o $(common-objs) +qconf-objs-generated :=3D $(common-objs-generated) =20 HOSTLDLIBS_qconf =3D $(shell . $(obj)/qconf-cfg && echo $$libs) HOSTCXXFLAGS_qconf.o =3D $(shell . $(obj)/qconf-cfg && echo $$cflags) @@ -192,12 +197,13 @@ $(obj)/qconf.o: $(obj)/qconf-cfg $(obj)/qconf.moc quiet_cmd_moc =3D MOC $@ cmd_moc =3D $(shell . $(obj)/qconf-cfg && echo $$moc) -i $< -o $@ =20 -$(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg +$(obj)/%.moc: $(srctree)/$(src)/%.h $(obj)/qconf-cfg $(call cmd,moc) =20 # gconf: Used for the gconfig target based on GTK+ hostprogs-y +=3D gconf gconf-objs :=3D gconf.o images.o $(common-objs) +gconf-objs-generated :=3D $(common-objs-generated) =20 HOSTLDLIBS_gconf =3D $(shell . $(obj)/gconf-cfg && echo $$libs) HOSTCFLAGS_gconf.o =3D $(shell . $(obj)/gconf-cfg && echo $$cflags) @@ -207,7 +213,7 @@ $(obj)/gconf.o: $(obj)/gconf-cfg # check if necessary packages are available, and configure build flags filechk_conf_cfg =3D $(CONFIG_SHELL) $< =20 -$(obj)/%conf-cfg: $(src)/%conf-cfg.sh FORCE +$(obj)/%conf-cfg: $(srctree)/$(src)/%conf-cfg.sh FORCE $(call filechk,conf_cfg) =20 clean-files +=3D *conf-cfg --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848077; cv=none; d=zohomail.com; s=zohoarc; b=adsvDNWeGxGsoFeHsI1VeG72hJq1huJ/+ZUJxMLOTV5f9Wh3e3HA/V6JC04iVRc44MSo2n75Lds+gNdig9ER4veAumViMMsMaOrCKIoobW/TMI0q0KzpCNlT7ed9ega73SR6Ec/zREe3sZxsZ4bKKTUpo85tycxlAVxhZj3QVPE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848077; 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=QFKhP4yeJEhe2N60uBuQ9xnWnqx5enG7ZS5tyXnIrik=; b=L27AqVLreZoNXcw1iHg1zYxWL8vgOl3hQQLwULo0aXNWAZiWrMqwwwfKp6ak582V/yIgdFnNsGmVGc0Z4ImV6NWUdPeW4aDLLJm58nzL8zRIE687xT7/L8J+ck425AUs4B1AS//PufIAO7lAnDZr40ZFapT2C8DIsR1gFaVmNKs= 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 1637848077823963.7990171244081; Thu, 25 Nov 2021 05:47:57 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231290.400254 (Exim 4.92) (envelope-from ) id 1mqF69-0005L4-G7; Thu, 25 Nov 2021 13:47:37 +0000 Received: by outflank-mailman (output) from mailman id 231290.400254; Thu, 25 Nov 2021 13:47:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF68-0005Ez-V9; Thu, 25 Nov 2021 13:47:36 +0000 Received: by outflank-mailman (input) for mailman id 231290; Thu, 25 Nov 2021 13:47:35 +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 1mqF0h-0007NX-KW for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:41:59 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 75dbf48d-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:41:58 +0100 (CET) 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: 75dbf48d-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847718; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=B5VOkpfrwP2eJU5CJkGnpLSWbZA0WNl/g37hS+zmyXc=; b=d2QVA48Js5vVqo0r6uSFIXckwuE6nBulUwHSSK8EbK2Il8ibs+1CRRoR wjCbAFBZ1lN3UAhzqxXCKB9y9w1kVktFG0XcbJJaflhLK7lh2HQJ2RbCt PS8OAVa61Zzxip/ICATPxpwUQtvhmkY9l4xe4TOGL87I6oNllDMn0AJsp I=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: r23o05NSS7N9utzX3GZjNdfn8NR2ahYDzERWs2Mvd9EoEvJm8StOqMdOmNZHWOmlR/mPybolMn nHTiW5TPhM9OPESq+BRKvzy2mighS0Ex+Os19efb5BwOKU1QrTvEiNgXn4Lglarfzl3yMU1sp0 Lwp5aU7xiy6qx03yLY4bzHWjO0LakUWvf+SznyBVEj9go7fuJ6gNzbRmSQqWFv0F0rH5JpKCly c/66nvr/NIppMXR9RMGVMsN3v/hHr6L+yqF/7AyrucywPqP3d0RcoClDnLnIS4lZ6J23F+NUSF gezsM3C33jAgriFKkBbdVqiK X-SBRS: 5.1 X-MesageID: 60634184 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:fcohw6IBeLswchRXFE+RApIlxSXFcZb7ZxGr2PjKsXjdYENS0TQCy zNKDDiFbKrcZmukL49+ad60px5XvZHQnNAwQAplqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC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FddpXSGOlLRxTG5y8ZMcv3ort9eUn5ngmJJSekPmQyJsYyWwzT99b4VQLz7y1SXDGvvM4zr uT4hAPWSJYOXSp4C8PSZK79xl+9pyFFyulzQ1HJMp9Yf0C1qNpmLCn4j/kWJcAQKEqcmmvGh ljOWRpB/LvDuY449tXNlJuolYbxHrssBFdeEkna8a2yaXvQ8F28zNISS+2PZz3cCj/5of3we eVPwvjgG/Qbh1IW4ZFkGrNmwK9itdvio7hWklZtEHnRNgn5D7phJj+N3NVVt70Lzbhc4FPkV kWK89hcGLOIJMK6TwJBeFt7NryOhaMOhz3fzfUpO0GrtiZ48Y2OXVhWIxTR2jdWK6F4Md99z Oos0CLMB9dTVvb+3g66sx1p IronPort-HdrOrdr: A9a23:ZHUwNavuVD1sNTzoGtU0F8DW7skDTtV00zEX/kB9WHVpmszxra 6TdZMgpHnJYVcqKQkdcL+7WJVoLUmxyXcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyIMbEQt6fHCWeDfOrIuOP3kpyVuQ== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634184" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v8 39/47] RFC, no-VPATH: x86/boot: workaround gcc including the wrong file Date: Thu, 25 Nov 2021 13:39:58 +0000 Message-ID: <20211125134006.1076646-40-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848078990100001 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD we generate cmdline.S and reloc.S, so we should include those generated file as presented in the build tree, but for file included with quote, gcc will first look into the directory where the source file is, that is where head.S is located and thus include cmdline.S that is present in the source tree when it is dirty. But that the wrong file as we want to include the file from the build tree. Work around by using <> to include those file as if the come from the system, as gcc will first look in directories listed with '-I' on the command line. So now we also need to add -I when building in the source tree. Signed-off-by: Anthony PERARD --- xen/arch/x86/boot/Makefile | 4 +++- xen/arch/x86/boot/head.S | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 04ee9da83333..4fc6b1d8ffc2 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -8,7 +8,9 @@ targets +=3D $(head-objs:.S=3D.o) head-objs :=3D $(addprefix $(obj)/, $(head-objs)) =20 ifdef building_out_of_srctree -$(obj)/head.o: CFLAGS-y +=3D -iquote $(obj) +$(obj)/head.o: CFLAGS-y +=3D -I$(obj) +else +$(obj)/head.o: CFLAGS-y +=3D -I$(src) endif $(obj)/head.o: $(head-objs) =20 diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index dd1bea0d10b3..66acd2e9bfc0 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -772,10 +772,10 @@ trampoline_setup: lret =20 cmdline_parse_early: -#include "cmdline.S" +#include =20 reloc: -#include "reloc.S" +#include =20 ENTRY(trampoline_start) #include "trampoline.S" --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848040; cv=none; d=zohomail.com; s=zohoarc; b=b7j5MCmPH+1q461qe9q6c6IbHLZkOIR8ZjgUhE+5bQcCF3sqGZG0+NIK/5T8vAz5mPJHFutEN//fczxiwBiVagBDufH9ND5j4/WY2e5CAzUlof6lb1MEesvoemcPpYzwRb2vR6JdR+hr4T/zhYMRS8w5O4kkkiycIJ5cDwt1UmY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848040; 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=0FaChPc13BX1pbPUP9MkqvlRoV3Xz8e+3X+Tw1IfGFk=; b=EFQZsUM5Z7X9+vHBXFh+QlwEO5ie3CTBxJ5p5dXrn+WhkKrRdjHjZmWpqnbSZAGjI1IpSHuEaf7mBUG3cdQmQQdcTwuvioS0TiYObNid9SiZ4PCefOohLzg6Xya9lcOzKUl0eSPDKz3KSQf/nSiF23WyrcwbkA2il945hKY4F6g= 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 1637848040332147.57465084768137; Thu, 25 Nov 2021 05:47:20 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231237.400086 (Exim 4.92) (envelope-from ) id 1mqF5T-0006MZ-K1; Thu, 25 Nov 2021 13:46:55 +0000 Received: by outflank-mailman (output) from mailman id 231237.400086; Thu, 25 Nov 2021 13:46:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5T-0006M4-Be; Thu, 25 Nov 2021 13:46:55 +0000 Received: by outflank-mailman (input) for mailman id 231237; Thu, 25 Nov 2021 13:46:54 +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 1mqF0l-0007NX-Oa for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:42:03 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 77a09a08-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:42:02 +0100 (CET) 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: 77a09a08-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847722; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MduM0JsgkZBJMQ1EP3iSTUZBDit7f0U+sXntkhT22ek=; b=DLCICTHY4abreI3Czy4uk6HR/o4xp1rrshPDjv98lrQFpSQl4Y2wfDfs VtgHuo2SQcs7h5OH7YGQvN2ZqO5TD4uib8eOvXeuiaoeBtIvYfXJmIQcq SJ3C4iF9kr6YrWGsiZME6MRRk813MrV8ZG88WDFY7tez5GsijhW3uYETE I=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 2alyoFq9MpGyovU7QSRTAi0cWX1WRc7Ul8O5oT+PZWjdafACqEPvo13hL1OxMZb8ig94QVh9Cn ddTGi1gC+SJgTvC1x2gb5nhuYpT8vn6CCQQQhT/wf8VPPItvIf7C+JLPkbCpX9qd0NQFwyu+sU 0fn0MhWpksI69vaqGXvZSTe2tBiCpjQ9Hor9KsWH3HjShQHW3uyxcZnz95wprdU8CybGrzWmb1 PkMbViXfUsQw8a8Lz8CVoafyOFc9Mwce7QFFNT+xSOzmZ7oscYs0D/GFUCBVJDqryhC92LVdRN c3Q35tZKq85aqZ8yovtaLvm6 X-SBRS: 5.1 X-MesageID: 58637888 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:Bkdzt6zPDLc8ypZ724l6t+d6wCrEfRIJ4+MujC+fZmUNrF6WrkUEm 2RJXW+OaK2La2fxetx2Pd+yp0oAupPdx4djHVdqpCAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAuLeNYYH1500s6wrRk2tQAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt8Fpy /IXuMGwcBkOeYjHpeYyXBBpPxgraMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uXzsIr 6ZBbmlQMFbT3Ipaw5riIgVors0lMMnsOpJZonx6xCvVJf0nXYrCU+PB4towMDIY25AQRqmON 5pxhTxHcAbsSkFuanItEb0Zrt6QonraUzEFpwfAzUYwyzeKl1EguFT3C/LUZd6iVchThlyfp G/N4yL+GB5yHNaS0yaf+3SgwOrGhzrmWZk6Hae9sPVthTW72Wg7GBAQE1yhrpGRiESzRtZeI Ew84Tc1oO4580nDZuf6Wxq0sXuVpCk2UtBbE/A5wAyVw6+S6AGcbkANSCJBb9o38tc7XzUw2 neGmtroAXpkt7j9YWKQ8PKYoC2/PQARLHQefmkUQA0d+d7hrYovyBXVQb5LErOxj9DzMSH9x XaNtidWr64IkccB2qG//FbGqzGhvJ7ESkgy/Aq/Y46+xlonPsj/PdXusAWFq6YbRGqEcr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zJyV X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58637888" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v8 40/47] RFC, no-VPATH: prepend $(srctree) to source prerequisite Date: Thu, 25 Nov 2021 13:39:59 +0000 Message-ID: <20211125134006.1076646-41-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848041058100005 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD Prefix many prerequisite with $(srctree) or replace $(src) with $(srcdir) to not have to rely on VPATH=3D$(srctree). Signed-off-by: Anthony PERARD --- xen/arch/arm/Makefile | 2 +- xen/arch/x86/Makefile | 4 ++-- xen/arch/x86/boot/Makefile | 2 +- xen/arch/x86/efi/Makefile | 2 +- xen/build.mk | 6 +++--- xen/include/Makefile | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index ae7a2f907540..8b340affbe38 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -111,7 +111,7 @@ $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds .PHONY: include include: =20 -$(obj)/xen.lds: $(src)/xen.lds.S FORCE +$(obj)/xen.lds: $(srcdir)/xen.lds.S FORCE $(call if_changed,cpp_lds_S) =20 $(obj)/dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 5fb7f1408768..9e5195f58d3b 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -236,7 +236,7 @@ include: $(objtree)/arch/x86/include/asm/asm-macros.h =20 $(obj)/asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P =20 -$(objtree)/arch/x86/include/asm/asm-macros.h: $(obj)/asm-macros.i $(src)/M= akefile +$(objtree)/arch/x86/include/asm/asm-macros.h: $(obj)/asm-macros.i $(srcdir= )/Makefile $(call filechk,asm-macros.h) =20 define filechk_asm-macros.h @@ -254,7 +254,7 @@ define filechk_asm-macros.h endef =20 $(obj)/efi.lds: AFLAGS-y +=3D -DEFI -$(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE +$(obj)/xen.lds $(obj)/efi.lds: $(srcdir)/xen.lds.S FORCE $(call if_changed_dep,cpp_lds_S) =20 clean-files :=3D \ diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 4fc6b1d8ffc2..ccba2e281dfc 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -47,7 +47,7 @@ $(head-objs): %.S: %.bin $(OBJCOPY) -O binary -R .got.plt $< $@ =20 =20 -%.lnk: %.o $(src)/build32.lds +%.lnk: %.o $(srcdir)/build32.lds $(LD) $(LDFLAGS_DIRECT) -N -T $(filter %.lds,$^) -o $@ $< =20 clean-files :=3D cmdline.S reloc.S *.lnk *.bin diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile index 81fda12a70ea..7af96629294a 100644 --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -3,7 +3,7 @@ include $(srctree)/common/efi/efi_common.mk quiet_cmd_objcopy_o_ihex =3D OBJCOPY $@ cmd_objcopy_o_ihex =3D $(OBJCOPY) -I ihex -O binary $< $@ =20 -$(obj)/%.o: $(src)/%.ihex FORCE +$(obj)/%.o: $(srcdir)/%.ihex FORCE $(call if_changed,objcopy_o_ihex) =20 $(obj)/boot.init.o: $(obj)/buildid.o diff --git a/xen/build.mk b/xen/build.mk index 65d8dbc13828..7b48b7eb1404 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -8,7 +8,7 @@ define cmd_banner mv -f $@.tmp $@ endef =20 -.banner: tools/xen.flf FORCE +.banner: $(srctree)/tools/xen.flf FORCE $(call if_changed,banner) =20 targets +=3D .banner @@ -33,14 +33,14 @@ define cmd_compile.h fi endef =20 -include/xen/compile.h: include/xen/compile.h.in .banner FORCE +include/xen/compile.h: $(srctree)/include/xen/compile.h.in .banner FORCE @cat .banner $(call if_changed,compile.h) =20 targets +=3D include/xen/compile.h =20 -include $(wildcard .asm-offsets.s.d) -asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.c +asm-offsets.s: $(srctree)/arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offset= s.c $(CC) $(call cpp_flags,$(c_flags)) -S -g0 -o $@.new -MQ $@ $< $(call move-if-changed,$@.new,$@) =20 diff --git a/xen/include/Makefile b/xen/include/Makefile index a3977a8bfccd..9fbe9f0de772 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -52,7 +52,7 @@ $(obj)/compat/%.h: $(obj)/compat/%.i $(srcdir)/Makefile $= (srctree)/tools/compat- $(obj)/compat/%.i: $(obj)/compat/%.c $(srcdir)/Makefile $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CF= LAGS)) $(cppflags-y) -o $@ $< =20 -$(obj)/compat/%.c: $(src)/public/%.h $(srcdir)/xlat.lst $(srcdir)/Makefile= $(srctree)/tools/compat-build-source.py +$(obj)/compat/%.c: $(srcdir)/public/%.h $(srcdir)/xlat.lst $(srcdir)/Makef= ile $(srctree)/tools/compat-build-source.py mkdir -p $(@D) $(PYTHON) $(srctree)/tools/compat-build-source.py $(srcdir)/xlat.lst <$< = >$@.new mv -f $@.new $@ --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848036; cv=none; d=zohomail.com; s=zohoarc; b=ZZ+C8u1OmtkWAPDuGUsoF6J2lWZ/N6BS4nGisX7RndJ7PInG3GnQtxd94z1TNvq3zhfGVTWl3XpyGmTdIkS54VKiTwh54/lN9hx6Pedk0ngEr9Y9t25R0vBhAYi/0gFekcOyZQqVd5CUSUij9IJREnTg+prxEsEFCaeEvpbein4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848036; 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=/TlbDGq6sTXbFJXEPGlFYlX6zg4y2zxNB1FZKlbUDBw=; b=MNTAKPjUbZLcgWnyHtbBpPXakCEdWT4fo9/wVnXkcddesra4S993J0ZseHNw6h6HGcBkFPKZDVS385jkZF6YiKCXNRdZXI/CjNgsYxN+RT37kq93kwDLIaayLVdDyajSs8xQudo4p41/zzHat5X4UbdFUb9sy944UT7qDCWQqWI= 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 1637848036368703.9244366092506; Thu, 25 Nov 2021 05:47:16 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231240.400101 (Exim 4.92) (envelope-from ) id 1mqF5X-0006v5-Vi; Thu, 25 Nov 2021 13:46:59 +0000 Received: by outflank-mailman (output) from mailman id 231240.400101; Thu, 25 Nov 2021 13:46:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5X-0006un-SD; Thu, 25 Nov 2021 13:46:59 +0000 Received: by outflank-mailman (input) for mailman id 231240; Thu, 25 Nov 2021 13:46:59 +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 1mqF0n-0007NX-5T for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:42:05 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 7939a6f8-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:42:04 +0100 (CET) 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: 7939a6f8-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847724; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oFeKa3n2Me2dmtKknD0wmyFv64+zX/Oc/3RcLG01aY8=; b=QKDeCyBWJqiy0VH36rEbjbG6+kiJUQ0rdC/NklQk55pB8AxMGG/VOfEK 8abQPNEnqOnfzXTWnmFGjJkVOu6OJvdDWZF3mMWENxyyKVzyLOM+a6tNs y2eP2CKSwUJS0bOMWolSTzuPiHGvUGbflp683PxRNNtWL0V2waWgA+TR6 k=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: bQI5etgoOvWX87AC6g3ns5eeLZQ2U8w7g1Xlwa45ec0xy8WLASwHxsxDlZlvEWaR4Aw0EDypYS W8qUid2ThOeZ5VkE1keU8gL4k0D/S6QU+bYNBBAw+UlXAKCDRHfjzushR7cl6x521ujgtNhBbP udAyfY9oY3qSfn2Hj53oN7eUrA+A6Hg3DhFLABTYFYq2GjwFbFiL6HwRFOeMqQJK5LgxZ9arQO A4c/3m4n8rGq4xbxX/jvwHheQVjBX1H8S2S8BL9xFfARZp07tMjuvJEvucD+hk9g0YWtM9JrsZ Zs1KdaqylmAKMoUGiCPz6Noo X-SBRS: 5.1 X-MesageID: 58637890 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:lYongKIXb5NdWn7jFE+RRpIlxSXFcZb7ZxGr2PjKsXjdYENS3zAHx mpJUG7XaPfZZTShft91b9y+9hxX78Xcz9A2HgNlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUZUideSc+EH140Es5xrZj6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB2mx9tg8 9pXt6avYjV2Y5X1k7UebQFhRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsFlgNgjK8/6epsSoHh6wRnSDOo8QICFSKLPjTNd9Gpg2JsRTaeGD yYfQSV2cUzdRBFLAQYSI85jo+yDvX6nbzIN/Tp5ooJoujOOnWSdyoPFMsfRe9GMbdVYmACfv G2u13/i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 SWZhfaairlRrqYYn6HfyZQZMTJhuKkz IronPort-HdrOrdr: A9a23:3+e+N68GIEyVRw/8rYRuk+DgI+orL9Y04lQ7vn2YSXRuHPBw8P re+sjztCWE8Ar5N0tBpTntAsW9qDbnhPtICOoqTNCftWvdyQiVxehZhOOIqVDd8m/Fh4pgPM 9bAtFD4bbLbGSS4/yU3ODBKadD/OW6 X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58637890" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Andrew Cooper , "George Dunlap" , Ian Jackson , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH v8 41/47] WIP, no-VPATH: build object from generated C files Date: Thu, 25 Nov 2021 13:40:00 +0000 Message-ID: <20211125134006.1076646-42-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848037827100001 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD we need to tell that the efi source files are "generated" Maybe listing generated sources would be better, and then we can automaticaly select the right rule. Signed-off-by: Anthony PERARD --- xen/Rules.mk | 9 ++++++++- xen/common/efi/efi_common.mk | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 45d2b72158b8..44af005fd57e 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -24,6 +24,8 @@ include $(srctree)/scripts/Kbuild.include obj-y :=3D lib-y :=3D targets :=3D +## targets made from generated sources +gen-objs-c :=3D subdir-y :=3D CFLAGS-y :=3D AFLAGS-y :=3D @@ -96,6 +98,7 @@ targets :=3D $(addprefix $(obj)/,$(targets)) lib-y :=3D $(addprefix $(obj)/,$(lib-y)) obj-y :=3D $(addprefix $(obj)/,$(obj-y)) obj-bin-y :=3D $(addprefix $(obj)/,$(obj-bin-y)) +gen-objs-c :=3D $(addprefix $(obj)/,$(gen-objs-c)) subdir-y :=3D $(addprefix $(obj)/,$(subdir-y)) nocov-y :=3D $(addprefix $(obj)/,$(nocov-y)) noubsan-y :=3D $(addprefix $(obj)/,$(noubsan-y)) @@ -242,7 +245,11 @@ define rule_cc_o_c $(call cmd,objcopy_fix_sym) endef =20 -$(obj)/%.o: $(src)/%.c FORCE +ifdef building_out_of_srctree +$(gen-objs-c): $(obj)/%.o: $(obj)/%.c FORCE + $(call if_changed_rule,cc_o_c) +endif +$(obj)/%.o: $(srctree)/$(src)/%.c FORCE $(call if_changed_rule,cc_o_c) =20 quiet_cmd_cc_o_S =3D CC $@ diff --git a/xen/common/efi/efi_common.mk b/xen/common/efi/efi_common.mk index d059bb30afa5..232cb508ee85 100644 --- a/xen/common/efi/efi_common.mk +++ b/xen/common/efi/efi_common.mk @@ -1,6 +1,9 @@ EFIOBJ-y :=3D boot.init.o pe.init.o ebmalloc.o runtime.o EFIOBJ-$(CONFIG_COMPAT) +=3D compat.o =20 +# common-efi-objs :=3D boot.c compat.c ebmalloc.c pe.c runtime.c +gen-objs-c :=3D boot.o compat.o ebmalloc.o pe.o runtime.o + CFLAGS-y +=3D -fshort-wchar CFLAGS-y +=3D -iquote $(srctree)/common/efi CFLAGS-y +=3D -iquote $(srcdir) --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848111; cv=none; d=zohomail.com; s=zohoarc; b=EF7gG8CxQfPmK4ctKzswtM0G8JNYz4w7qjoyC/4581p491IW3JDFgNmq9CWcMrNPrc0JFPAFREc/Y01F6M9OQ7jCFRYC0ulCLdVr8LrgnmQSZ9T4gjO6G5VAasrLNLVJKnS/JhzcJYQx+daKEYH2PGcsy0k2yW4B0e0CGY555kU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848111; 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=fTs0VErTQ+stBeOZqZ0Yb5krXY2UbHI1mHRcJiq0v+s=; b=LUdKIr+DmZCPeGRbIabpor8IWG8OUO1Q1c1fFUmGd+frsNh7tRYVajSrCcV5mTi/EvgXQ4W6XQUuISsFmzUMUkz8As9JYpw7caZ+wSGMSdOjXHGMEEueMth91CRwQMhPd0ElbOo54+K7nrfMVWol3RUrbMQT48VQ3bTom1OUO0o= 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 1637848111587261.81367733668037; Thu, 25 Nov 2021 05:48:31 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231328.400433 (Exim 4.92) (envelope-from ) id 1mqF6o-0006VT-11; Thu, 25 Nov 2021 13:48:18 +0000 Received: by outflank-mailman (output) from mailman id 231328.400433; Thu, 25 Nov 2021 13:48:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6n-0006Tn-P6; Thu, 25 Nov 2021 13:48:17 +0000 Received: by outflank-mailman (input) for mailman id 231328; Thu, 25 Nov 2021 13:48:16 +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 1mqF1D-0007NX-Hi for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:42:31 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 88f64a68-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:42:30 +0100 (CET) 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: 88f64a68-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M5y2bRJwpf/f0iMaWElHVm6rrtkE9/3uGDJa1vQtN3Q=; b=XJ1agrudUQ1NaqUb7sXHOKZ2P6SUF8ASYQ53t/ozyBto7GC1H60wLdTm loza74i3lFw/X0UZ3taK8UNExfIBaoYmvFuysZFfpEw7NnwRtkGqEvbs2 18F85z6bRBfvCepU0soJI2SEjSi1a+lzWw+iEzeOTWsGxzFBoXz8QHSS+ s=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: +2VEdq1WgiM/G1sp2lY11YCa7Erm61nQNOXokXF538l83+fX9k5dAvASaT44CAaIIM0zTs6pRv /ArX0jk6a9Ws6lcFXdk0cEZQDYk6kerArldHTosuhrBjU8VmdrmJXUr4syJjt/BpXFNm0+iGLL APgv3nrao5vzL/YfoWWzGQ9CyToQfHCYqVY171Fq5qzxhcr735Z4w0+Yqcbi83JeE5Zx1Wr7kJ eEhpYH8TlPyi32mvsQi0JeYKINidKljsc82yL5zVbVxXO6ivciLoAAf4Ew3YGfkZmY2ircxvxN Jc3EEgyEveoUTZNDkzpFvw4j X-SBRS: 5.1 X-MesageID: 60634187 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:oL6KfatgdgMA6GCvFsJboqbUMefnVL9ZMUV32f8akzHdYApBsoF/q tZmKW2Gb6mDZDGjet8gPo238kpUupHRzYBgT1Q9rys0Hi9D+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZQP0VOZigHtIQMsadUsxKbVIiGHhJZS5LwbZj29cx24XhWWthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ Npl65GpWA4gErP2vMdCDRhKLAZbIapP5+qSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DNYUDunZm3HfBAOwvW5zrSKTW/95Imjw3g6iiGN6AP 5RCNWM/M3wsZTV/PQ0sDLY5l96Yl0j6VyZbqQO4mqsetj27IAtZj+G2bYu9lsaxbclakkuXv Gvu43XyAhZcMseWjzWC7BqEivfUmCLnWKobDLCi6uNxm1qX23ASDxsNE1C8pJGRmkO4Ht5SN UEQ0i4vtrQpslymSMHnWB+1q2LCuQQTM/JZFfE67wecjLLZ+Q+DCkALSzdAbJots8peeNAx/ gbXxZWzX2Up6eDLDyLGnluJkd+sEXYYNH4LbAMady8mvIfisr4Uqw7IR8k2RcZZkebJMT33x jmLqg03iLMSkdMH2s2HwLzXv96/jsOXF1Bov207Skrgt1okP9D9O+RE/HCCta4YRLt1WGVtq 5TtdyK2yOkVRa+AmyWWKAnmNOH4vq3VWNEwbLMGInXAy9hP0yL8FWyzyGsnTKuMDirjUWW0C HI/QSsLuPdu0IKCNMebmb6ZBcUw1rTHHt/4TP3SZdcmSsEvL1DYo3A+NR/KgTGFfK0QfUYXY 8nzTCpRJSxCVfQPIMSeG4/xLoPHNghhnDiOFPgXPjys0KaEZW79dFv2GADmUwzN14vd+F+92 48Gb6OikkwDOMWjMni/2dNCdjgicClkba0aXuQKL4Zv1CI9Qzp/YxIQqJt8E7FYc1N9yr2Vo yrjAxAAkzISRxTvcG23V5yqU5u3Nb4XkJ7xFXdE0Y+A1ydxbICxwr0YcpdrL7Ar+PY6lax/T uUfetXGCfNKE2yV9zMYZJj7jYpjaBX02l7eY3v7OGAyL8x6WgjE2t74ZQ+zpiMAOTW66Jklq Lq62wKFHZdaH1Z+DNzbYe6Exk+quSRPg/p7WkbFe4EBeEjl/IVwBTb2i/s7f5MFJRnZn2PI3 AeKGxYI4+LKptZtotXOgKmFqaavEvd/QRUGTzWKs+7uOHCDrGS5wIJGXOKZRhznVTv5qPe4e OFY7/DgK/lbzlxEhJVxTuRwxqUk6tqx+7IDllZ4HG/GZkiAA697JiXUxtFGs6BAy+MLuQayX U7TqNBWNa/QZZHgGV8VYgEkcv6CxbcfnTyLtaY5J0Dz5SlW+rubUBoNY0nQ2XIFdLYlYpk4x eoBudIN713tgxUnBd+KkyRI+jneNXcHSagm6skXDYKDZtDHEb2ejUgw0hPL3aw= IronPort-HdrOrdr: A9a23:3rvEOaF025sUspwxpLqE0MeALOsnbusQ8zAXP0AYc3Jom6uj5q aTdZUgpGfJYVkqOE3I9ertBEDEewK4yXcX2/h3AV7BZniEhILAFugLhuGO/9SjIVybygc079 YYT0EUMrzN5DZB4voSmDPIceod/A== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634187" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v8 42/47] RFC, no-VPATH: workaround includes in xsm/flask Date: Thu, 25 Nov 2021 13:40:01 +0000 Message-ID: <20211125134006.1076646-43-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848113621100001 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD maybe generated header should be in a different directory using <>-included headers instead of "" to avoid gcc including headers from the source tree when it needs to includes them from the build tree. Signed-off-by: Anthony PERARD --- xen/xsm/flask/include/avc.h | 4 ++-- xen/xsm/flask/include/avc_ss.h | 2 +- xen/xsm/flask/include/objsec.h | 2 +- xen/xsm/flask/include/security.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/xsm/flask/include/avc.h b/xen/xsm/flask/include/avc.h index c14bd07a2b39..b9be6ca5aa8b 100644 --- a/xen/xsm/flask/include/avc.h +++ b/xen/xsm/flask/include/avc.h @@ -14,8 +14,8 @@ #include #include =20 -#include "flask.h" -#include "av_permissions.h" +#include +#include #include "security.h" =20 extern bool flask_enforcing; diff --git a/xen/xsm/flask/include/avc_ss.h b/xen/xsm/flask/include/avc_ss.h index a3d7d1ef07a8..d80c2c7e57d8 100644 --- a/xen/xsm/flask/include/avc_ss.h +++ b/xen/xsm/flask/include/avc_ss.h @@ -6,7 +6,7 @@ #ifndef _FLASK_AVC_SS_H_ #define _FLASK_AVC_SS_H_ =20 -#include "flask.h" +#include =20 int avc_ss_reset(u32 seqno); =20 diff --git a/xen/xsm/flask/include/objsec.h b/xen/xsm/flask/include/objsec.h index b576a5dd4381..69ec66d3fe33 100644 --- a/xen/xsm/flask/include/objsec.h +++ b/xen/xsm/flask/include/objsec.h @@ -14,7 +14,7 @@ #define _FLASK_OBJSEC_H_ =20 #include -#include "flask.h" +#include #include "avc.h" =20 struct domain_security_struct { diff --git a/xen/xsm/flask/include/security.h b/xen/xsm/flask/include/secur= ity.h index ec8b442a8f3b..8433541aa738 100644 --- a/xen/xsm/flask/include/security.h +++ b/xen/xsm/flask/include/security.h @@ -10,7 +10,7 @@ #ifndef _FLASK_SECURITY_H_ #define _FLASK_SECURITY_H_ =20 -#include "flask.h" +#include =20 #define SECSID_NULL 0x00000000 /* unspecified SID */ #define SECSID_WILD 0xffffffff /* wildcard SID */ --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848115; cv=none; d=zohomail.com; s=zohoarc; b=X472tgeqvP7K+weQLP2cPiTjTloO8ZCg+JY7Y7jY7XBuRPw5576FXjR62CLmgZh5dtaVFNmo+i7q/1jRnybVdNxp8qFMtqgcHaSSPv+gEtpyEIZwhPV+ymnevymHYO0gQ3PseLgliFyhxiqEnVr27WkoKakljTgtQCch65AsKb4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848115; 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=/GFy72DIdAYsWKrtRJc1nNHxeJaUuIEDEoLbHxRKeT4=; b=eOLrrRKS/SFePd++NK1wjKnvznvu/CJn5YU++XBBU4HBhHmtl2nRzYxpAdS47YmGNzW2ILO8qyj8YVPeBqFL9DiWncUTRnXZhppKJ3BDUs8W+bzMfhErh17aVb4nCnMDjywNUIf3qV4DUnQK9LMibdMofcrp8nnKoBoSfabb46Y= 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 1637848115925995.4129650685198; Thu, 25 Nov 2021 05:48:35 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231329.400443 (Exim 4.92) (envelope-from ) id 1mqF6q-0006wi-2Z; Thu, 25 Nov 2021 13:48:20 +0000 Received: by outflank-mailman (output) from mailman id 231329.400443; Thu, 25 Nov 2021 13:48: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 1mqF6p-0006ur-Gg; Thu, 25 Nov 2021 13:48:19 +0000 Received: by outflank-mailman (input) for mailman id 231329; Thu, 25 Nov 2021 13:48:17 +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 1mqF0s-00076i-H2 for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:42:10 +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 7b739584-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:42:09 +0100 (CET) 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: 7b739584-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847729; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=o70thL8LZfXVGN0BO7FVeJVHlQxVD96SJrfgO735CIw=; b=Z75/qpFCXf+PG1EyVL2smPIxEojmFvfSdIiDMGQ2WvHHGke+AUt4hM9F WK54DRos6L+MBntxPeEP1RCEx5LdPgTI8h8HqMZTNtcF8EQszUy09QDbi MRHwzXaAQV/5uUUQz098CkNZKPKV4VdsAWFWPJu09cbSuGd4e3V6tIBpA Q=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: NuhfKlMtoiYjL7hI3xnhJJk2ng5kkY1GC7m9UKJeO4kPabWG7I1YbRETyTtAskKQ4MZDvrYky6 Nl6n7cFbwssCn3yCfIKOtiDxXil1ZCM4WBWAnCKWUotJV8KK+yuoyOXjBwcxWJ00qGSDeXQo3I Re4C4Vx8yuzYMgwPJDe/3CxpAwuHKWsEj2P2tMRS+Hvw4Vw4SVTN3rIKjziTwesxPdFkaUo2Yq f23HL+eMlXWaWNmT99Zk3pcRkPrmajvA47S7TcAHuGrhgV3zqXm9ln4MeWCfqqQBs91nzcVVRe 7O7dgnCq6BEMZNNlGNhOuBBy X-SBRS: 5.1 X-MesageID: 58576724 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:yTl/Xa6GhV+/DuOF8XzF1gxRtMXAchMFZxGqfqrLsTDasY5as4F+v jQfUD3Xbq3bYTH1L9wjaY6/pxtQvJbXmoRmHgJr/ykyHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuV3zyIQUBUjclkfJKlYAL/En03FVAMpBsJ00o5wrdg2NMw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7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JoUBY13l9YVncnSjjvI+L8wWBw/Ewz+Wi 1SfDRsC/LGfqI4p6tjZw6uDqt7xQed5G0NbGUjd7Kq3anaGrjbyn9cYXb/RLz7HVW7y9KGzX slvzqnxYK8dgVJHk4tgCLI3n6gw0MTi+u1BxQN+EXSVM1nyUuF8ImOL1NVkv7FWwuMLohO/X 0+C94UIObiNP8+5QlcdKBB8M7aG3PAQ3DLT8e40MAPx4youpOiLVkBbPh+tji1BLeQqbNN5k Ll54MNGuRaijhcKM8qdinEG/muBGXUMTqE7u8xIG4TskAcqlglPbJG05vUaO31ThwGg6nUXH wI= IronPort-HdrOrdr: A9a23:HjttuqPPh/mKFMBcTsejsMiBIKoaSvp037Eqv3ofdfUzSL3+qy nOpoVj6faaslcssR0b9OxofZPwI080lqQFhbX5X43DYOCOggLBR+tfBMnZsljd8kXFh4hgPM xbHZSWZuedMbEDt7eY3DWF X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58576724" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 43/47] WIP, no-VPATH: build object from generated assembly source file Date: Thu, 25 Nov 2021 13:40:02 +0000 Message-ID: <20211125134006.1076646-44-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848116850100005 Content-Type: text/plain; charset="utf-8" gen-objs-c and gen-objs-S can't have the list of targets. Alternative, merge both list and use $(filter ). Signed-off-by: Anthony PERARD --- xen/Rules.mk | 6 ++++++ xen/build.mk | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/xen/Rules.mk b/xen/Rules.mk index 44af005fd57e..2d8d32f5fd72 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -26,6 +26,7 @@ lib-y :=3D targets :=3D ## targets made from generated sources gen-objs-c :=3D +gen-objs-S :=3D subdir-y :=3D CFLAGS-y :=3D AFLAGS-y :=3D @@ -99,6 +100,7 @@ lib-y :=3D $(addprefix $(obj)/,$(lib-y)) obj-y :=3D $(addprefix $(obj)/,$(obj-y)) obj-bin-y :=3D $(addprefix $(obj)/,$(obj-bin-y)) gen-objs-c :=3D $(addprefix $(obj)/,$(gen-objs-c)) +gen-objs-S :=3D $(addprefix $(obj)/,$(gen-objs-S)) subdir-y :=3D $(addprefix $(obj)/,$(subdir-y)) nocov-y :=3D $(addprefix $(obj)/,$(nocov-y)) noubsan-y :=3D $(addprefix $(obj)/,$(noubsan-y)) @@ -255,6 +257,10 @@ $(obj)/%.o: $(srctree)/$(src)/%.c FORCE quiet_cmd_cc_o_S =3D CC $@ cmd_cc_o_S =3D $(CC) $(a_flags) -c $< -o $@ =20 +ifdef building_out_of_srctree +$(gen-objs-S): $(obj)/%.o: $(obj)/%.S FORCE + $(call if_changed_dep,cc_o_S) +endif $(obj)/%.o: $(src)/%.S FORCE $(call if_changed_dep,cc_o_S) =20 diff --git a/xen/build.mk b/xen/build.mk index 7b48b7eb1404..2f2cbbbeabf8 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -83,6 +83,13 @@ prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE $(call if_changed,ld) endif =20 +# Source generated in arch/*/Makefile to build $(TARGET)-syms +gen-objs-S +=3D .$(TARGET)-syms.0.o +gen-objs-S +=3D .$(TARGET)-syms.1.o +# Source generated in arch/*/Makefile to build $(TARGET).efi +gen-objs-S +=3D .$(TARGET).efi.0r.o .$(TARGET).efi.0s.o +gen-objs-S +=3D .$(TARGET).efi.1r.o .$(TARGET).efi.1s.o + targets +=3D prelink.o =20 $(TARGET): prelink.o FORCE --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848097; cv=none; d=zohomail.com; s=zohoarc; b=UQs9sEqmvqR9SfxlwbZNT5/jtDg0iVKp7D+IQ6QTHUkTpbAvmUtm8PS37bmvR2KR6doK53/i4kdP0T5IYv59GWXVO3JrpuOeOg5+4bbzzl5pMsFuiQvseQRK3yyKfAqKWmxxo2yh2goaq2KT1G33tLMRDf6nMN0bJUNC54FS0Ow= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848097; 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=J70Ii7fiM+L8UpU8moBDujEWLGfdZyq+Q60SNMBJOIE=; b=PivR8dWW0AK51VWTs++APJ/iiW3An+QNQdp3YwQL1SyyAl8+fSCQaVPChJa3HapaQSGDqjmA19Kp06NZJwYRa43TyZ7p5AXzPLGfC+iCS5XnwHZ932fCh3wkDJI7AMo79wXJA5wpLpen2Xl0HSI9K4WLb7gGfy2OvdTdv7mpcqM= 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 1637848097135357.32641147503875; Thu, 25 Nov 2021 05:48:17 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231313.400358 (Exim 4.92) (envelope-from ) id 1mqF6W-0002Ap-0v; Thu, 25 Nov 2021 13:48:00 +0000 Received: by outflank-mailman (output) from mailman id 231313.400358; Thu, 25 Nov 2021 13:47:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6V-00026e-5s; Thu, 25 Nov 2021 13:47:59 +0000 Received: by outflank-mailman (input) for mailman id 231313; Thu, 25 Nov 2021 13:47:57 +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 1mqF0t-00076i-HJ for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:42:11 +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 7cfb8380-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:42:10 +0100 (CET) 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: 7cfb8380-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847730; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qiTCQde4ESeiEmkkyzpe1PUHy1DiTkjg/pAXNlV41C8=; b=fm1yg1FP1ScNdkBPHYS1Sxh6mFKwi4y0Y3OuVX4eJVEEz8LDawQNbiIc FOFrkmINkyvW8ICakNsvm5/kJazuSKsJbpeN7264C/8ZCC+bvMst++9eC lp+DLtO6SqotCCXz4EgexWABIujM/7k8ud1p/3N945TzZqVvPhGp+BkQw Q=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: p2E3iK5ubT2TJdzcT1TYGnOtYAnCJXZSJgSZdmYK29bNZEfw6lVl4SVJAUI1R8NNwidRu4Z/7W fmBnygXvUMNieufWuSG/r818X60MVeR0u926HauLxZ+82ttMDh0bJ7N4naGxeMmFxaU2lXPzdi 8o3zi+BWz+wfRO4xSUFqedqCUYxzuHlAHg6S13BWpPNT+lVXMcH6vgbBrTtjRf54A+vSygusZS sp8+4aExr4uaGqDHuls/JFhG0Q7ZFTUibmniwB6Xx3xBzxsV+ctQhHJGAGDuS36JMg5xqMXHKe Lzqe+SWerqEthP/oTuPIsUj5 X-SBRS: 5.1 X-MesageID: 58576729 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:725R7KtZsRD2jzLt4P41BUD9lOfnVNJZMUV32f8akzHdYApBsoF/q tZmKWzVOffbN2b2c95xYN/i9x5U7JCDn9ZmTQNkpX8xES4T+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZQP0VOZigHtIQMsadUsxKbVIiGHhJZS5LwbZj29cx24XhWWthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ Nplr6K3dgQCNYjwpboQdUd+LSRZZawX9+qSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DNYUDunZm3HfBAOwvW5zrSKTW/95Imjw3g6iiGN6DN 5dGN2U1PXwsZTVJHXITA7wUnt24j17tVmJ8q3mFqJEetj27IAtZj+G2bYu9lsaxbcdImkeVo ErW8mK/B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P0RCz uV4X0Yea2CwHnb/Tkc= IronPort-HdrOrdr: A9a23:y2VlsKNEAx6esMBcTsejsMiBIKoaSvp037Eqv3ofdfUzSL3+qy nOpoVj6faaslcssR0b9OxofZPwI080lqQFhbX5X43DYOCOggLBR+tfBMnZsljd8kXFh4hgPM xbHZSWZuedMbEDt7eY3DWF X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58576729" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 44/47] WIP, no-VPATH: build object from S source to be in build_in.o Date: Thu, 25 Nov 2021 13:40:03 +0000 Message-ID: <20211125134006.1076646-45-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848097940100003 Content-Type: text/plain; charset="utf-8" similair to gen-objs-S, but obj-gen-y will be added to build_in.o Signed-off-by: Anthony PERARD --- Notes: we could maybe use $(targets) instead of introducing new variables. xen/Rules.mk | 21 ++++++++++++++------- xen/common/Makefile | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 2d8d32f5fd72..0ef45d2c7087 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -22,6 +22,7 @@ include $(srctree)/scripts/Kbuild.include =20 # Initialise some variables obj-y :=3D +obj-gen-y :=3D lib-y :=3D targets :=3D ## targets made from generated sources @@ -98,6 +99,7 @@ always-y :=3D $(addprefix $(obj)/,$(always-y)) targets :=3D $(addprefix $(obj)/,$(targets)) lib-y :=3D $(addprefix $(obj)/,$(lib-y)) obj-y :=3D $(addprefix $(obj)/,$(obj-y)) +obj-gen-y :=3D $(addprefix $(obj)/,$(obj-gen-y)) obj-bin-y :=3D $(addprefix $(obj)/,$(obj-bin-y)) gen-objs-c :=3D $(addprefix $(obj)/,$(gen-objs-c)) gen-objs-S :=3D $(addprefix $(obj)/,$(gen-objs-S)) @@ -112,6 +114,11 @@ ifneq ($(hostprogs-y),) include $(srctree)/scripts/Makefile.host endif =20 +ifndef building_out_of_srctree + obj-y +=3D $(obj-gen-y) + obj-gen-y :=3D +endif + # subdir-builtin may contain duplications. Use $(sort ...) subdir-builtin :=3D $(sort $(filter %/built_in.o, $(obj-y))) =20 @@ -144,7 +151,7 @@ else endif =20 # Reset COV_FLAGS in cases where an objects has another one as prerequisite -$(nocov-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(extra-y)): \ +$(nocov-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(obj-gen-y) $(extra-y= )): \ COV_FLAGS :=3D =20 $(non-init-objects): _c_flags +=3D $(COV_FLAGS) @@ -155,7 +162,7 @@ ifeq ($(CONFIG_UBSAN),y) UBSAN_FLAGS :=3D $(filter-out -fno-%,$(CFLAGS_UBSAN)) $(filter -fno-%,$(CF= LAGS_UBSAN)) =20 # Reset UBSAN_FLAGS in cases where an objects has another one as prerequis= ite -$(noubsan-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(extra-y)): \ +$(noubsan-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(obj-gen-y) $(extra= -y)): \ UBSAN_FLAGS :=3D =20 $(non-init-objects): _c_flags +=3D $(UBSAN_FLAGS) @@ -209,13 +216,13 @@ cmd_ld_builtin =3D \ $(LD) $(XEN_LDFLAGS) -r -o $@ $(real-prereqs) endif =20 -$(obj)/built_in.o: $(obj-y) FORCE - $(call if_changed,$(if $(strip $(obj-y)),ld_builtin,cc_builtin)) +$(obj)/built_in.o: $(obj-y) $(obj-gen-y) FORCE + $(call if_changed,$(if $(strip $(obj-y) $(obj-gen-y)),ld_builtin,cc_built= in)) =20 $(obj)/lib.a: $(lib-y) FORCE $(call if_changed,ar) =20 -targets +=3D $(filter-out $(subdir-builtin), $(obj-y)) +targets +=3D $(filter-out $(subdir-builtin), $(obj-y) $(obj-gen-y)) targets +=3D $(lib-y) $(MAKECMDGOALS) =20 $(obj)/built_in_bin.o: $(obj-bin-y) @@ -258,7 +265,7 @@ quiet_cmd_cc_o_S =3D CC $@ cmd_cc_o_S =3D $(CC) $(a_flags) -c $< -o $@ =20 ifdef building_out_of_srctree -$(gen-objs-S): $(obj)/%.o: $(obj)/%.S FORCE +$(gen-objs-S) $(obj-gen-y): $(obj)/%.o: $(obj)/%.S FORCE $(call if_changed_dep,cc_o_S) endif $(obj)/%.o: $(src)/%.S FORCE @@ -279,7 +286,7 @@ define cmd_obj_init_o $(OBJCOPY) $(foreach s,$(SPECIAL_DATA_SECTIONS),--rename-section .$(s)= =3D.init.$(s)) $< $@ endef =20 -$(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): $(obj)/%.init.o: $(ob= j)/%.o FORCE +$(filter %.init.o,$(obj-y) $(obj-bin-y) $(obj-gen-y) $(extra-y)): $(obj)/%= .init.o: $(obj)/%.o FORCE $(call if_changed,obj_init_o) =20 quiet_cmd_cpp_i_c =3D CPP $@ diff --git a/xen/common/Makefile b/xen/common/Makefile index b1e076c30b81..fe3a4b7a8619 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -1,6 +1,6 @@ obj-$(CONFIG_ARGO) +=3D argo.o obj-y +=3D bitmap.o -obj-$(CONFIG_HYPFS_CONFIG) +=3D config_data.o +obj-gen-$(CONFIG_HYPFS_CONFIG) +=3D config_data.o obj-$(CONFIG_CORE_PARKING) +=3D core_parking.o obj-y +=3D cpu.o obj-$(CONFIG_DEBUG_TRACE) +=3D debugtrace.o --=20 Anthony PERARD From nobody Fri Nov 29 12:37:27 2024 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=1637848090; cv=none; d=zohomail.com; s=zohoarc; b=R/0Zt5QTpc248s9q6kRS1IXg92A7rdTsX9IR/ao8kgALfzhM0t1PvZxB79nuyI7kQyzjXJju5NSvZKvT1+34igOgOd5nSp8wFZgvuXmsCy9w8VW4aMxIA5r07re+BI0sibEWn0M0uM4bw61nLoVBQ7alxDV8IzZ6A3pQobuHKjg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848090; 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=121TcyCYR6vUlnxDXoJKHkS74ZAleN/t4m6EIsPUVe0=; b=HC8oLp5yYK1lRkhcQ6OZdYe463J2knVyYuaVRZRCStgQqijyZkiZwMKrajZ4uLJ3as+Z7hvWF8pppKVZf8iUcBzwBD3RETsFJV+V7Rc6xplHL0or2F6dPEJyq3nj5BfKCobjYo0iJAQzwDOHoIVx+uRULShO6jncHmvxhAlXnEI= 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 1637848090815940.709353810909; Thu, 25 Nov 2021 05:48:10 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231309.400339 (Exim 4.92) (envelope-from ) id 1mqF6R-00019B-Hw; Thu, 25 Nov 2021 13:47:55 +0000 Received: by outflank-mailman (output) from mailman id 231309.400339; Thu, 25 Nov 2021 13:47:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6Q-00015q-St; Thu, 25 Nov 2021 13:47:54 +0000 Received: by outflank-mailman (input) for mailman id 231309; Thu, 25 Nov 2021 13:47:51 +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 1mqF1C-0007NX-ET for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:42:30 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 87919499-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:42:29 +0100 (CET) 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: 87919499-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847749; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kLngYtN5+zVn384EmQlaf0kegkNhkeNirtRV6fuCSxQ=; b=AXBfYM1d2FtC4Ol/SRFu3n7DidIuvR/YEvtZHbyetxR4zoIZ3ljX2pXk yo34UkAMfhQjAr4Q7qmirv99gyx/9G0DjzAFe6F8deAgqynMNJfO821eV M1YM6GCzInqdvxeJVVCumyci2oT5iByJANUkDIrsuuHAOkwInhFwXuK3l Y=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: +VagdRN3XIM3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Y6TiX+rb HJoB17726NtN9/YhEdcLy7VJVoBEmskKKdgrNhWotKPjOW21dARbsKheCJrgEIWReOktK1vZ 0QCpSWY+eQMbEVt6nHCXGDYrQd/OU= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="60634194" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Andrew Cooper , "George Dunlap" , Ian Jackson , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH v8 45/47] WIP, no-VPATH: build xen, out-of-tree! Date: Thu, 25 Nov 2021 13:40:04 +0000 Message-ID: <20211125134006.1076646-46-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848092187100001 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD We can retire VPATH now, and $(srctree) to prerequisite of generic rules. (targets %.i and %.s and %.E are updated but may not work as expected.) Signed-off-by: Anthony PERARD --- xen/Makefile | 3 +-- xen/Rules.mk | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index fbce0f6771fb..32c36426ed7c 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -188,9 +188,8 @@ else endif =20 objtree :=3D . -VPATH :=3D $(srctree) =20 -export building_out_of_srctree srctree objtree VPATH +export building_out_of_srctree srctree objtree =20 export XEN_ROOT :=3D $(abs_srctree)/.. =20 diff --git a/xen/Rules.mk b/xen/Rules.mk index 0ef45d2c7087..6fcb1f6b769f 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -268,7 +268,7 @@ ifdef building_out_of_srctree $(gen-objs-S) $(obj-gen-y): $(obj)/%.o: $(obj)/%.S FORCE $(call if_changed_dep,cc_o_S) endif -$(obj)/%.o: $(src)/%.S FORCE +$(obj)/%.o: $(srctree)/$(src)/%.S FORCE $(call if_changed_dep,cc_o_S) =20 =20 @@ -298,18 +298,18 @@ cmd_cc_s_c =3D $(CC) $(filter-out -Wa$(comma)%,$(c_fl= ags)) -S $< -o $@ quiet_cmd_cpp_s_S =3D CPP $@ cmd_cpp_s_S =3D $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< =20 -$(obj)/%.i: $(src)/%.c FORCE +$(obj)/%.i: $(srctree)/$(src)/%.c FORCE $(call if_changed_dep,cpp_i_c) =20 -$(obj)/%.s: $(src)/%.c FORCE +$(obj)/%.s: $(srctree)/$(src)/%.c FORCE $(call if_changed_dep,cc_s_c) =20 -$(obj)/%.s: $(src)/%.S FORCE +$(obj)/%.s: $(srctree)/$(src)/%.S FORCE $(call if_changed_dep,cpp_s_S) =20 -$(obj)/%.E: $(src)/%.c FORCE +$(obj)/%.E: $(srctree)/$(src)/%.c FORCE $(call if_changed_dep,cpp_i_c) -$(obj)/%.E: $(src)/%.S FORCE +$(obj)/%.E: $(srctree)/$(src)/%.S FORCE $(call if_changed_dep,cpp_s_S) =20 # Linker scripts, .lds.S -> .lds --=20 Anthony PERARD From nobody Fri Nov 29 12:37:28 2024 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=1637848042; cv=none; d=zohomail.com; s=zohoarc; b=KD+5vuUCnJ1tI5onDVnGMTBrPz4l1WC0feMYTa7wNIaerQ6jvMPI8TW4kGuyIlfZHK2pse39ollPLlM6fqgzfjVzewYXsnSpDyaocoJNWfFqi/CKSRST5SAimf+XzpYFk39mfvVnseBD3B+CeZxwl+OBUvbdA6Yo9vtYAUV2+Tc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848042; 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=aq28qbcmByDgvAoVFB6UnCJJBDftii4eBDupaWIOgmc=; b=gMcKyk0fPOvi0dJ6tS88uvOZlsT3DhCO5se9LUqHhQ8z7Vcn9ydA5b/3J3b0hqPYUG3htKPkACRHceilDpbMm3knHKKGcVMWn7opIIznMeone2lY3bRUoT+bfJ8E7PfgEkqqf0MQDWmx6RjMJzH7h+73TjxPwr3CuCSVVsbK7ts= 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 1637848042015965.6430225685739; Thu, 25 Nov 2021 05:47:22 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231241.400112 (Exim 4.92) (envelope-from ) id 1mqF5Z-0007CS-8g; Thu, 25 Nov 2021 13:47:01 +0000 Received: by outflank-mailman (output) from mailman id 231241.400112; Thu, 25 Nov 2021 13:47:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF5Z-0007BX-43; Thu, 25 Nov 2021 13:47:01 +0000 Received: by outflank-mailman (input) for mailman id 231241; Thu, 25 Nov 2021 13:46:59 +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 1mqF0z-00076i-Of for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:42:17 +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 8010330d-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:42:16 +0100 (CET) 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: 8010330d-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847736; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NT4AA79X/GUr8W4g3mlMQcdf/icBfAifuywINiEHnwE=; b=hiGvm5PoPx6vF33fQ/9UHoO7JvZ13rL4g6InNy9w00eDbByPf0lTgYqd LMeB2QNNw6UTZF5qvy0Pvqkyz6bEi6LDHpd/QVkSqkGOelIl7IqLk0ijr PR7QBbGuy4AwIks4rEHWmTk2w/VjCCgERbQhe9JvzckZcLOfLoBX5laj9 g=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: w55DqMXpiPkrnZZPQu3Swh8NkaaNSg+TCqDDzvppfdV5EuxfpIG56bMElYDneQqDPnHE1OUfhk nCyBe4jjIabFRq6zcJXmQmcGW/yGbAkLvvr9OFTNSj6a25kZZCEUz3BTlw8o80b9yy0+1U/2dh QTlG2L6k+NK/1bQPrt/r0CFENLLE+yvah9QmeN7w/Z1ixCyy8kGhVT/h8r/anCShMn7JP2Ilvt 1YQAXtOHY89Tt/KDqS5aV7wcAyTS8yBRPiiGf5QbLoDlajroSe9AoDFSVyNk9Kr2o3Uln/X/nh yj43fHRkojCOD1R8+8ea2TWG X-SBRS: 5.1 X-MesageID: 58135505 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:YsOKY635BrY68XKFdvbD5UR2kn2cJEfYwER7XKvMYLTBsI5bp2FVn GpOUGGEPKmJYGenfYx1aInjo0lU6p/QmoA2Tgs6pC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkS5PE3oHJ9RGQ74nRLlbHILOCan8ZqTNMEn970Es6wbNh2OaEvPDia++zk YKqyyHgEAfNNw5cagr4PIra9XuDFNyr0N8plgRWicJj5TcypFFMZH4rHomjLmOQf2VhNrXSq 9Avbl2O1jixEx8FUrtJm1tgG6EAaua60QOm0hK6V0U+6/TrS+NbPqsTbZIhhUlrZzqhv/BA4 Y5clb6JdhYYHJDUweg4dRtlKnQrVUFG0OevzXmXtMWSywvNcmf2wuUoB0YzVWEa0r8pWycUr 6VecW1TKEDY7w616OvTpu1Ej8I/LM7tLcUHt2tp1z3xBvc6W5HTBa7N4Le02R9t1pkVQKuGO qL1bxJoLxfHRRRBIm0aM80YvMeQu0TkVD5H/Qf9Sa0fvDGIkV0ZPKLWGNjIft2HQ+1Fk0Deo XjJl0ziGQ0TPtGbzTuD81qvi/XJkCe9X5gdfJWn8tZ6jVvVwXYcYDUUX1ampfiyimalRslSb UcT/0IGvaU0sUCmUNT5dxm5u2Kf+A4RXcJKFO834x3LzbDbiy6QAHQESThQLsQrrsYsSRQl0 1aIm5XiAjkHmLyKS1qN+7GMtzSwNCMJa2gYakc5oRAtuoe55ttp11SWE4glQPXdYsDJ9S/Y4 xC7hXMvp5cqst869ZijpFzipTCRn82cJuIq3Tn/UmWg5wJ/QYeqYY209FTWhcp9wJalokqp5 yZdxZXHhAwaJdTUzXHWHr1RdF28z6/daGW0vLJ5I3U2G91BEVaHdJsY3jxxLVwB3i0sKW6wO x+7Ve+8CfZu0JqWgU1fP93Z5ycCl/GI+THZuhf8NIcmX3SJXFXblByCnGbJt4wXrGAikLskJ bCQetu2AHARBMxPlWTtGLhCgO97l3pglAs/oKwXKDz9j9KjiIO9E+9ZYDNikMhlhE97nOkl2 4kGbJbbo/mueOb/fjPW4eYuwaMidhAG6WTNg5UPLIare1M+cEl4UqO56e5xKuRNwvUO/s+Vr y7VZ6Ot4Aem7ZExAV7RMS4LhXKGdcsXkE/XygRwZwv1gCZ6Pt70hErdHrNuFYQaGCVY5aYcZ 5E4lw+oW5yjkxzLpGYQa4fTtotneEj5jA6CJXP9MjM+Y4RhV0rC/dq9Jlnj8ywHDyyWs8oio uL/ilOHEMRbHwkyXtzLbP+Pzk+quSRPkuxFQEaVcMJYf1/h8dY2JnWp3OM3OcwFNT7K2iCei 1SNGR4dqOSU+901/dDFiLqqtYCsF+ciTENWE3OCteS9NDXA/3rlyohFCb7acTfYXWLy2aOje eQKkK2sbKxZxA5H6tMuHaxqwKQy48rUi4Vblgk0Tm/Wa1mLC697JiXU18d4qaAQlKRSvhG7W xzT94ACa6mJIs7sDHUYOBEhMraYzfgRlzTfsaY1LUH96HMl9baLSxwPbRyFiSgbJ7ppKoI1h +wmvZdOuQC4jxMrNPeAjzxVqDvQfiBRDf1/u8FIGpLvhyoq1kpGMM7VBSLB6Z2Sb8lBbxsxK TiOiaue37lRyyIuqZbo+aQhCQaFuakzhQ== IronPort-HdrOrdr: A9a23:vPKh8qrFqyOuLiOTGiecOQ4aV5oteYIsimQD101hICG8cqSj+P xG+85rsiMc6QxhIU3I9urgBEDtex7hHNtOkOss1NSZLW3bUQmTTL2KhLGKq1aLJ8S9zJ856U 4JSdkZNDSaNzZHZKjBjDVQa+xQo+W6zA== X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58135505" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Andrew Cooper , "George Dunlap" , Ian Jackson , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH v8 46/47] RFC, no-VPATH: remove check for clean source tree for out-of-tree builds Date: Thu, 25 Nov 2021 13:40:05 +0000 Message-ID: <20211125134006.1076646-47-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848043463100002 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD Signed-off-by: Anthony PERARD --- xen/Makefile | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 32c36426ed7c..a3c574ed1a87 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -282,7 +282,6 @@ tools_fixdep: $(Q)$(MAKE) $(build)=3Dtools tools/fixdep =20 PHONY +=3D outputmakefile -# Before starting out-of-tree build, make sure the source tree is clean. # outputmakefile generates a Makefile in the output directory, if using a # separate output directory. This allows convenient use of make in the # output directory. @@ -297,15 +296,6 @@ cmd_makefile =3D { \ =20 outputmakefile: ifdef building_out_of_srctree - $(Q)if [ -f $(srctree)/.config -o \ - -d $(srctree)/include/config -o \ - -d $(srctree)/include/generated ]; then \ - echo >&2 "***"; \ - echo >&2 "*** The source tree is not clean, please run 'make$(if $(finds= tring command line, $(origin XEN_TARGET_ARCH)), XEN_TARGET_ARCH=3D$(XEN_TAR= GET_ARCH)) distclean'"; \ - echo >&2 "*** in $(abs_srctree)";\ - echo >&2 "***"; \ - false; \ - fi $(Q)ln -fsn $(srctree) source $(call cmd,makefile) $(Q)test -e .gitignore || \ --=20 Anthony PERARD From nobody Fri Nov 29 12:37:28 2024 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=1637848068; cv=none; d=zohomail.com; s=zohoarc; b=exoe80x2I+PPHV/XT0MB5hz83cBlDxPLKRNVXmOw2yJPSdGewa4+9FBCs9/1JGZp/wlXvzZ5o4vtDCFkL2Kp52mAco8RY7ONdzJs+k5ziKPqvCrh1p4rJtNvRs5haDW+Md2xvyx/ZPVN0YRGKaAL6zzu1MUKS45oXLkmXyRYqnk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637848068; 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=8ugCLh42Q+a4DQYdAKyGJWHySvgWLMnG+qoblrUljsU=; b=Xbci/7GBazP5sjlxuWhoBDnWytHKA3CfEQ0PgBZpLSEFTeB0WexbmHMdSdSsyhSUmtgNSHfHTtrxPCHSIXf1IgGEr0j/D9/qhCtj8vY4reaPLzAeOxcLyy00RzXcE8HuswfDADI2vU/oMd52HUb2b7jazq85/7JyaUCosB5lcBI= 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 1637848068818164.80266592386965; Thu, 25 Nov 2021 05:47:48 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.231280.400222 (Exim 4.92) (envelope-from ) id 1mqF63-0003oU-6k; Thu, 25 Nov 2021 13:47:31 +0000 Received: by outflank-mailman (output) from mailman id 231280.400222; Thu, 25 Nov 2021 13:47:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF63-0003oC-0a; Thu, 25 Nov 2021 13:47:31 +0000 Received: by outflank-mailman (input) for mailman id 231280; Thu, 25 Nov 2021 13:47:30 +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 1mqF11-0007NX-UI for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:42:20 +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 815005b7-4df5-11ec-9787-a32c541c8605; Thu, 25 Nov 2021 14:42:18 +0100 (CET) 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: 815005b7-4df5-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847738; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wkmmiuAD5A/O6wcnuJk4gUEzCv+65h31hRHwc6XHY2w=; b=iH/P2RzQoGeJIA+Ew9BWhtKj9PUUCyidqnwFIdsS3F/FfUa4M5nY4sBz CoXCKBXA0u4+c5s8vaN4fI9Arg2GmtfEiw/ncbjn+wyp1LzFxrIy+cykU 2LHMVsmsZOr7306Uz3on4jroU3pIZM86veo9M1KAgJv1ISsnCY/YG/PpA I=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: R82v6C2kRPXf0jXbtE48KEQxG+CWaoeMQ5FnYNrQlUF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77M0CZe Chz/sCnjy/dW8aY4CRNhA+LpH+m+E= X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="59006070" From: Anthony PERARD To: CC: Anthony PERARD , Ian Jackson , Wei Liu Subject: [XEN PATCH v8 47/47] WIP: no more link farming for xen-shim Date: Thu, 25 Nov 2021 13:40:06 +0000 Message-ID: <20211125134006.1076646-48-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1637848071006100001 Content-Type: text/plain; charset="utf-8" --- tools/firmware/xen-dir/Makefile | 71 ++------------------------------- 1 file changed, 3 insertions(+), 68 deletions(-) diff --git a/tools/firmware/xen-dir/Makefile b/tools/firmware/xen-dir/Makef= ile index 6f5e208ab413..a50fdcbb8b17 100644 --- a/tools/firmware/xen-dir/Makefile +++ b/tools/firmware/xen-dir/Makefile @@ -7,74 +7,9 @@ FORCE: =20 D=3Dxen-root =20 -# Minimun set of files / directories go get Xen to build -LINK_DIRS=3Dconfig xen -LINK_FILES=3DConfig.mk - -DEP_DIRS=3D$(foreach i, $(LINK_DIRS), $(XEN_ROOT)/$(i)) -DEP_FILES=3D$(foreach i, $(LINK_FILES), $(XEN_ROOT)/$(i)) - -# Exclude some intermediate files and final build products -LINK_EXCLUDES :=3D '*.[isoa]' '*.bin' '*.chk' '*.lnk' '*.gz' '.*' -LINK_EXCLUDES +=3D lexer.lex.? parser.tab.? conf -LINK_EXCLUDES +=3D asm-offsets.h asm-macros.h compile.h '*-autogen.h' -LINK_EXCLUDES +=3D mkelf32 mkreloc symbols config_data.S xen.lds efi.lds -LINK_EXCLUDES +=3D '*.map' xen xen.gz xen.efi xen-syms check.efi - -# To exclude full subtrees or individual files of not sufficiently specific -# names, regular expressions are used: -LINK_EXCLUDE_PATHS :=3D xen/include/compat/.* -LINK_EXCLUDE_PATHS +=3D xen/include/config/.* -LINK_EXCLUDE_PATHS +=3D xen/include/generated/.* -LINK_EXCLUDE_PATHS +=3D xen/arch/x86/boot/reloc[.]S -LINK_EXCLUDE_PATHS +=3D xen/arch/x86/boot/cmdline[.]S - -# This is all a giant mess and doesn't really work. -# -# The correct solution is to fix Xen to be able to do out-of-tree builds. -# -# Until that happens, we set up a linkfarm by iterating over the xen/ tree, -# linking source files. This is repeated each time we enter this director= y, -# which poses a problem for a two-step "make; make install" build process. -# -# Any time the list of files to link changes, we relink all files, then -# distclean to take out not-easy-to-classify intermediate files. This is = to -# support easy development of the shim, but has a side effect of clobbering -# the already-built shim. -# -# $(LINK_EXCLUDES) and $(LINK_EXCLUDE_DIRS) should be set such that a para= llel -# build of shim and xen/ doesn't cause a subsequent `make install` to deci= de to -# regenerate the linkfarm. This means that all intermediate and final bui= ld -# artefacts must be excluded. -linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE - mkdir -p $(D) - rm -f linkfarm.stamp.tmp - set -e; \ - $(foreach d, $(LINK_DIRS), \ - (mkdir -p $(D)/$(d); \ - cd $(D)/$(d); \ - find $(XEN_ROOT)/$(d)/ -type d |\ - sed 's,^$(XEN_ROOT)/$(d)/,,g' | xargs mkdir -p .);) \ - $(foreach d, $(LINK_DIRS), \ - (cd $(XEN_ROOT); \ - find $(d) ! -type l -type f $(addprefix ! -name ,$(LINK_EXCLUDES)) \ - | grep -v $(patsubst %,-e '^%$$',$(LINK_EXCLUDE_PATHS))) \ - >> linkfarm.stamp.tmp ; ) \ - $(foreach f, $(LINK_FILES), \ - echo $(f) >> linkfarm.stamp.tmp ;) - cmp -s linkfarm.stamp.tmp linkfarm.stamp && \ - rm linkfarm.stamp.tmp || { \ - cat linkfarm.stamp.tmp | while read f; \ - do rm -f "$(D)/$$f"; ln -s "$(XEN_ROOT)/$$f" "$(D)/$$f"; done; \ - mv linkfarm.stamp.tmp linkfarm.stamp; \ - } - -# Copy enough of the tree to build the shim hypervisor -$(D): linkfarm.stamp - $(MAKE) -C $(D)/xen distclean - -$(D)/xen/.config: $(D) - $(MAKE) -C $(@D) KBUILD_DEFCONFIG=3Dpvshim_defconfig defconfig +$(D)/xen/.config: FORCE + mkdir -p $(@D) + $(MAKE) -f $(XEN_ROOT)/xen/Makefile -C $(@D) KBUILD_DEFCONFIG=3Dpvshim_de= fconfig defconfig =20 xen-shim: $(D)/xen/.config $(MAKE) -C $(