From nobody Sun May 5 07:12:38 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=1629802273; cv=none; d=zohomail.com; s=zohoarc; b=TNx/RlIeoXJBNwH6ERMJClkHnBLNEhiR0LYPyuvsmi66BS+muJ0Uf15tzuSJhNtwZBVhYtCdKu6iEU0J9OXblkvRcOAvh9O7bgwne5D7rHKStAO9NGEeG5VkXvr6TQ2Ql10AHnBNFXXTY8pRDkXg5AsDIsuV2xtU3kibNlfEj8E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802273; 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=AXVDEpxbuqUmUm4Sj8zJ6trSP09gP9ciISTfwOKedlM=; b=AilHV5ltJK/sKyYXmgeW/adS1Rv7H74nQfuJyAqbIjgVMITmF7B6FX+uRWTSUoq89DN0iWYv+MrSWBklytuCkkzZQsj0MiqBDYZF8wOezwyUIFGxLljpQ/MGGdXiaukCAaT3qgeaFJNi95Em6skXZRg21Ke/gFTCnXhG/z6pZoM= 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 1629802273169356.9542176198356; Tue, 24 Aug 2021 03:51:13 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170893.311887 (Exim 4.92) (envelope-from ) id 1mIU14-0000wn-G1; Tue, 24 Aug 2021 10:50:50 +0000 Received: by outflank-mailman (output) from mailman id 170893.311887; Tue, 24 Aug 2021 10:50: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 1mIU14-0000wg-D2; Tue, 24 Aug 2021 10:50:50 +0000 Received: by outflank-mailman (input) for mailman id 170893; Tue, 24 Aug 2021 10:50:49 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU13-0000wa-1d for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:50:49 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2391e626-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:50:47 +0000 (UTC) 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: 2391e626-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802247; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZLzfpeVcbnlSXaU/oXQHrIyxhVmhoG8fkFq0zEl5QGU=; b=gjoPltIOWDehLMSsFBmNhkLwLLqm8lTkwHkPwxNG+BuhodSC8UVINA1l 6kakporpfQ3rlMnYOLDXaVER2ir8+GynUO8VqxeFB0dXgp1ODios5Mnls 5NGIq1CelCmii2eU3IyVFwLUc74xLRKC45ZLJejRZKiMwcHT++5vgvdOg w=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: AVNnb+JEY8R2ArffvvoKtbGZfLWQxKGZG0eMLt1JTgyyKgl89dBSLjybw6iU/yluRcxPR7vZPc GxlVN555aMZ+sRSbJmXhk3gbOT5VkoVvEZhkni4hFF7oTYFZAZysAs1jqe4abK6kVohpIKqTmf Gy7ttY1f9rnIzobVeyq6DLK7QCGKyzRtASghstnSgH51Ak3jmvB55Wxk6yXWZQjBSu2vCUUxm4 YzPbApUlbkAWrg+4HqxbNdFDwvQ9AT6qTrXGF0SuDkoGrVsCNLYO3ulctltfA5DiCzETKryOy9 eUS4q1EoiN9bTUvz87uz2yhs X-SBRS: 5.1 X-MesageID: 52875421 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:ydPET60cHRfX5uAW14LdXgqjBQ5yeYIsimQD101hICG9Lfb0qy n+pp4mPEHP4wr5AEtQ/+xpOMG7IU80hqQFmLX5XI3SFzUO11HYSL2KgbGN/9SCIVy1ygc+79 YGT0EWMrSZYTdHZK3BkWqF+qMbsby6GdeT9IXjJhlWLD1CWuVF1UNUGwybGkp5SE1tHpwiDq eR4cJBun6JZWkXRt7TPAhIY8Hz4/nw0L72ax8PABAqrCOUiymz1bL8Gx+Emj8DTjJ0x6s4+2 StqX232kzjiYD09vbv7R6S031koqqj9jKFPr3PtiEhEESstu9vXvUlZ1TNhkFwnAjl0idTrD CFmWZaAy000QKdQoj9m2qW5yDwlDkp8HPs0lmenD/qptH4XiszD45biZteaQax0TtXgDhQ6t M+44uijeshMfoAplWN2/HYExVx0kakq3srluAey3RZTIsFcbdU6YgS5llcHpsMFD/zrNlPKp gnMOjMoPJNNV+KZXHQuWdihNSqQ3QoBx+DBkwPoNac3TRalG1wi0EY2MsclHEd849VcegM28 3UdqBz0L1eRM4faqxwQO8HXMusE2TIBQnBNWqDSG6XYZ3v+0i92aIfxY9Fmt1CVKZ4sKfaqa 6xI2+w71RCBn4GIff+o6Fj41TXRnmhUXD31sRTjqIJyoHBeA== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="52875421" 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?= , Tim Deegan Subject: [XEN PATCH v7 01/51] build: introduce cpp_flags macro Date: Tue, 24 Aug 2021 11:49:48 +0100 Message-ID: <20210824105038.1257926-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802274198100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v7: - also filter -flto - and convert "asm-offsets.s" and "xen/x86/%.lds" to use cpp_flags as well. =20 v6: - switch to a macro as suggested which allows to be used with both a_flags and c_flags =20 v5: - new patch xen/Makefile | 2 +- xen/Rules.mk | 7 +++++-- xen/arch/x86/Makefile | 2 +- xen/arch/x86/mm/Makefile | 2 +- xen/arch/x86/mm/hap/Makefile | 2 +- xen/arch/x86/mm/shadow/Makefile | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 94e837182615..4ceb02d37441 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -410,7 +410,7 @@ include/xen/compile.h: include/xen/compile.h.in .banner @mv -f $@.new $@ =20 asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.c - $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -g0 -o $@.new -MQ $@= $< + $(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 diff --git a/xen/Rules.mk b/xen/Rules.mk index d65d6a48993b..c99c4a9475c9 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -133,6 +133,9 @@ endif # Always build obj-bin files as binary even if they come from C source.=20 $(obj-bin-y): XEN_CFLAGS :=3D $(filter-out -flto,$(XEN_CFLAGS)) =20 +# To be use with $(a_flags) or $(c_flags) to produce CPP flags +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 @@ -222,13 +225,13 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): = %.init.o: %.o FORCE $(call if_changed,obj_init_o) =20 quiet_cmd_cpp_i_c =3D CPP $@ -cmd_cpp_i_c =3D $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -MQ $@ -o $@ = $< +cmd_cpp_i_c =3D $(CPP) $(call cpp_flags,$(c_flags)) -MQ $@ -o $@ $< =20 quiet_cmd_cc_s_c =3D CC $@ cmd_cc_s_c =3D $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ =20 quiet_cmd_cpp_s_S =3D CPP $@ -cmd_cpp_s_S =3D $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ = $< +cmd_cpp_s_S =3D $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< =20 %.i: %.c FORCE $(call if_changed,cpp_i_c) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index fe38cfd54421..462472215c91 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -292,7 +292,7 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i M= akefile =20 efi.lds: AFLAGS-y +=3D -DEFI xen.lds efi.lds: xen.lds.S - $(CPP) -P $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ $< + $(CPP) -P $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< =20 boot/mkelf32: boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index b31041644fe8..2818c066f76a 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -15,7 +15,7 @@ guest_walk_%.o: guest_walk.c Makefile $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%.s: guest_walk.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/hap/Makefile b/xen/arch/x86/mm/hap/Makefile index 22e7ad54bd33..c6d296b51720 100644 --- a/xen/arch/x86/mm/hap/Makefile +++ b/xen/arch/x86/mm/hap/Makefile @@ -9,7 +9,7 @@ guest_walk_%level.o: guest_walk.c Makefile $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%level.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%level.s: guest_walk.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makef= ile index 770213fe9d84..fd64b4dda925 100644 --- a/xen/arch/x86/mm/shadow/Makefile +++ b/xen/arch/x86/mm/shadow/Makefile @@ -10,7 +10,7 @@ guest_%.o: multi.c Makefile $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_%.i: multi.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_%.s: multi.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802275; cv=none; d=zohomail.com; s=zohoarc; b=aqoeEqX8KU/ekgii2+To6k2gePJjpKRofnNt0ePo5iHvz16kMK3VmK2jMo5VAjLFQ4eRnsQuNKG5KNHzqQVM8biUSSOiHkYD74EWD+FeGKuIetX2BQcExBMcI1X28mNIODxGMePN1cz9rClkItvzOJrAYrM8n0uutbHbE0Bw0sA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802275; 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=IToDycNPaF/TpGOs37CW5AoNksnTqROAI3Jtvqc3rqg=; b=fQ83qkfdUWudEoK0C56Nip5DvGvbMU7CXkHaH/O7m/Fs0xVzSgYiz9jOWAmcJKhh2xhzlsC+dGVIiaNmjrDa3krDN8MrrJkYr5eapoOzEHiTzt3B8NBgWm9xVAMQfrdQTO8nQhaiYd/C7MRpKQvfyD7G9yw+mAge2UlME7vAlKM= 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 162980227534270.54511835377082; Tue, 24 Aug 2021 03:51:15 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170894.311899 (Exim 4.92) (envelope-from ) id 1mIU19-0001Ef-Nu; Tue, 24 Aug 2021 10:50:55 +0000 Received: by outflank-mailman (output) from mailman id 170894.311899; Tue, 24 Aug 2021 10:50: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 1mIU19-0001EV-L1; Tue, 24 Aug 2021 10:50:55 +0000 Received: by outflank-mailman (input) for mailman id 170894; Tue, 24 Aug 2021 10:50:54 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU17-0000wa-U1 for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:50:53 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2500185c-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:50:50 +0000 (UTC) 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: 2500185c-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802250; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7FQvY3N7Dn2gL79xi6cUz0Zwpk5522yieldEo41vf9E=; b=T1Ty6VnqgeKKmXZtGbatuyRsSEbY1oVdQ0iv35A7ERL/LtheyPmhaa2A OYYP/E2SjkiHNJ5OAYOPctk7S8BoF8+T7LY3PrgY6c3DouR3kRYsh0e2G bv9iS93wsseL1uYlP/sIIDIcT4SaFN72Qv82EJoG0KKOBrPXfCxiJtN0S w=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: yEjU0FBp9IJ/pt/cWd7MOMiQs/gaeXC7LKezZ8lzU2l8qghCsDt5kQMzl/yzQ+tnwFI6gz6Z9Z C19xRsa/J4k9/5wLWLWdmtnPiGkIsm9nHYGCMg6QbQuJZ0sxaNY4pFcQ4vC1wl5HTSoZzA+Eqf xzfaSBlMO8XLFCOKMn50hqb0NyZsTAUv++0dkgHLC2pcXHB1/zFiHySIwCLqjHjzZrB08kUZ7h RqZfvlPP7WDiP/bjUOXX1uwD40OMEl2Fi/xviKUuvVnBIKOwNToMQ9dM5yihL4vDF6Le8HeEwG uNh6lv5gLxDItdVITJDavX5U X-SBRS: 5.1 X-MesageID: 50772160 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:Z1PDxKljkOmbwsZwz9jBIhV7QIbpDfIU3DAbv31ZSRFFG/Fxl6 iV8sjzsiWE7gr5OUtQ4exoV5PhfZqxz/JICMwqTNKftWrdyQyVxeNZnOjfKlTbckWUnINgPO VbAsxD4bXLfCFHZK3BgTVQfexO/DD+ytHLudvj X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="50772160" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 02/51] build: use if_changed on built_in.o Date: Tue, 24 Aug 2021 11:49:49 +0100 Message-ID: <20210824105038.1257926-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802276088100003 Content-Type: text/plain; charset="utf-8" In the case where $(obj-y) is empty, we also replace $(c_flags) by $(XEN_CFLAGS) to avoid generating an .%.d dependency file. This avoid make trying to include %.h file in the ld command if $(obj-y) isn't empty anymore on a second run. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v7: - Display "CC" for cmd_cc_builtin instead of "LD". =20 v6: - use $(if $(strip $(obj-y)),ld_builtin,cc_builtin) as suggested - rebased =20 v4: - Have cmd_ld_builtin depends on CONFIG_LTO, which simplify built_in.o rule. xen/Rules.mk | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index c99c4a9475c9..5a6a5d63260f 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -147,17 +147,22 @@ include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk c_flags +=3D $(CFLAGS-y) a_flags +=3D $(CFLAGS-y) $(AFLAGS-y) =20 -built_in.o: $(obj-y) $(if $(strip $(lib-y)),lib.a) $(extra-y) -ifeq ($(strip $(obj-y)),) - $(CC) $(c_flags) -c -x c /dev/null -o $@ -else +quiet_cmd_cc_builtin =3D CC $@ +cmd_cc_builtin =3D \ + $(CC) $(XEN_CFLAGS) -c -x c /dev/null -o $@ + +quiet_cmd_ld_builtin =3D LD $@ ifeq ($(CONFIG_LTO),y) - $(LD_LTO) -r -o $@ $(filter $(obj-y),$^) +cmd_ld_builtin =3D \ + $(LD_LTO) -r -o $@ $(filter $(obj-y),$(real-prereqs)) else - $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$^) -endif +cmd_ld_builtin =3D \ + $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$(real-prereqs)) endif =20 +built_in.o: $(obj-y) $(if $(strip $(lib-y)),lib.a) $(extra-y) FORCE + $(call if_changed,$(if $(strip $(obj-y)),ld_builtin,cc_builtin)) + lib.a: $(lib-y) FORCE $(call if_changed,ar) =20 --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802277; cv=none; d=zohomail.com; s=zohoarc; b=QFm2ylcpdmtkCM1Fzk/7ZzI/cwVhisPQaXyit23eYIiFADZco1z2jGrcO6nis0ZRlQrac3RXVC04Jeg4PjY67Wt4lNrNLPAcHJXfl2T6dabxggyzp2dvvnHw1ov6FR9ubTYwTCf8ZL8C7aaEaUSe0ZoUJrmyPswbdJQhDb2PIT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802277; 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=wx7AK/w0EPkoei5RWvRFPBXJtbYq5LSXlwUwc56N3Qw=; b=k17rGL82tUwHAzH2KfACccP3clD0GtjaMSrs3rB/a3HBiWV5VL4ayD7Q0I9lu7ZM9ULzQHw4Gd8n3gu9wJwI4cFt1nINQq9v1pEZ721Oe5wOva7D0xEAY4BMzGau0akQkKlPcqaxlaS7tH2WZWw4RqzPiPvpgL3Mds9CgXOv/Q0= 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 1629802277231327.1011225450874; Tue, 24 Aug 2021 03:51:17 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170896.311921 (Exim 4.92) (envelope-from ) id 1mIU1F-0001se-I3; Tue, 24 Aug 2021 10:51:01 +0000 Received: by outflank-mailman (output) from mailman id 170896.311921; Tue, 24 Aug 2021 10:51: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 1mIU1F-0001sQ-ET; Tue, 24 Aug 2021 10:51:01 +0000 Received: by outflank-mailman (input) for mailman id 170896; Tue, 24 Aug 2021 10:51:00 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1E-0001EC-7s for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:00 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ef0fc935-9c35-46d8-a7ef-10ed928aeba0; Tue, 24 Aug 2021 10:50:51 +0000 (UTC) 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: ef0fc935-9c35-46d8-a7ef-10ed928aeba0 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802251; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Q742NIKsfagzLTI5IRupvO4GLE3bLFBwUaLmp6zd0iU=; b=ewvO3pYNInt3Ak6F8VmSe8r0zV+C+2jfUmaQb5C0WQ+WwZK5PY+CkZ7Z EZlrlZdXgtZJaNZ7tsvPiBMtIofAXLgUAbXMK+CkDlGhptxZkhtJcLaMd 3b425zHaoiBDP47wbnrb/EFw7irWCTZZ0Fbe+rdFq1aMNWYcqp4y2bVtf 4=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 2ibQmHC7TUxW3LONtSaNsTqjpSt2xZEyWMZFxgziJ7B03C4tL1Pvpb0sScLPd34rI20DEBBrkG 1QwFvR/nyHdxIflkipHqSQPmnZVeXEikszOd1uii8/n2noZ8jzt7CsQCsmgxNzztIHUh7szzWQ KDhkk6/UNeOKktnfG2bwCZGjlLsob8OhYuYnKBy3JB20FNhg1/hVTAauG1/t/Jn69lOT6VpINc TLSVGh3Lg2vh298nklo8mK2qFjCEiGvEaby1t7jAT0H99or5RUsT4SJQ3Gl9MLXWVZ83gqUqWr swPzu1VnrHzlUsJ4OrFr+J80 X-SBRS: 5.1 X-MesageID: 51166334 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:rrW4qKz8RU4/Y18Hk6ZjKrPw1r1zdoMgy1knxilNoHxuH/BwWf rPoB17726RtN91YhsdcL+7V5VoLUmzyXcX2/h1AV7BZniEhILAFugLgbcKqweKJ8SUzJ8+6U 4PSclD4N2bNykGsS75ijPIb+rJFrO8gd+VbeS19QYScelzAZsQiDuQkmygYzZLrA8tP+teKL OsovBpihCHYnotYsGyFhA+LpL+T42iruOeXfYebSRXkDWzsQ== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51166334" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 03/51] build: use if_changed_rules with %.o:%.c targets Date: Tue, 24 Aug 2021 11:49:50 +0100 Message-ID: <20210824105038.1257926-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802278500100001 Content-Type: text/plain; charset="utf-8" Use $(dot-target) to have the target name prefix with a dot. Now, when the CC command has run, it is recorded in .*.cmd file, then if_changed_rules will compare it on subsequent runs. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Rules.mk | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 5a6a5d63260f..eaf770414305 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -192,19 +192,27 @@ FORCE: =20 SRCPATH :=3D $(patsubst $(BASEDIR)/%,%,$(CURDIR)) =20 -%.o: %.c Makefile +quiet_cmd_cc_o_c =3D CC $@ ifeq ($(CONFIG_ENFORCE_UNIQUE_SYMBOLS),y) - $(CC) $(c_flags) -c $< -o $(@D)/.$(@F).tmp -MQ $@ -ifeq ($(CONFIG_CC_IS_CLANG),y) - $(OBJCOPY) --redefine-sym $<=3D$(SRCPATH)/$< $(@D)/.$(@F).tmp $@ -else - $(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 1629802281920926.5231897689177; Tue, 24 Aug 2021 03:51:21 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170897.311932 (Exim 4.92) (envelope-from ) id 1mIU1K-0002ON-RR; Tue, 24 Aug 2021 10:51:06 +0000 Received: by outflank-mailman (output) from mailman id 170897.311932; Tue, 24 Aug 2021 10:51: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 1mIU1K-0002Nw-Nu; Tue, 24 Aug 2021 10:51:06 +0000 Received: by outflank-mailman (input) for mailman id 170897; Tue, 24 Aug 2021 10:51:05 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1J-0001EC-8G for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:05 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ba79b65f-1574-4338-8e89-3dc8bd3c0e8d; Tue, 24 Aug 2021 10:50:54 +0000 (UTC) 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: ba79b65f-1574-4338-8e89-3dc8bd3c0e8d DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802254; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dpg5dNCI5KoYFV8Mi9Zw+FnUJgLgwOk+tl2lsfCuIpI=; b=WxQTo/I68+jj5YzY1gJyYz1ev9mkqdoNEXfujm79XBCj9tZlRJY42LTd 8yQNd/cpA8WXl6Q1rhw9ynwmNGoVWgEKWdcqSus0dQzrqEtJ7Y+nG9MbV c62suEx0bVb33v0UDsPdJKD/8BNk7mMRb+q81NjdKvjSQjZc7cCDOAzXI Q=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: S8yQSeJGRsoRd1pLsohXAez0LXWsoIxiAww9UL1Cn8mi7ctWXmaZ2w5CO45h5BMeDlNTLc6So5 qdHXXJdFKfxHesppObzaDL4FjKCSGaUQ1HqWZOJcPbn6f0nMTOfBIRJUtdp0gP1Igi/3WW74DT nV1Vm49eK2n5It0a5IQU8B0+cxTkEcqXLXxZfv9L9szJ/vIAPeGUFkUD23HUjN6/7bfzQhQVcF AgrJKr/CdCDheh23u2gOeybdbcVfuYuEMt0WbMdjJFuhEto/dme14F38+n7w3gtaAUdnkbWRhj FTa+aGqnCBo8zqzyVxLFx/VX X-SBRS: 5.1 X-MesageID: 51540863 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:DVxTCqv7YSBWhy7LR4RO3J1L7skDTtV00zEX/kB9WHVpmszxra 6TdZMgpHnJYVcqKQkdcL+7WJVoLUmxyXcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyIMbEQt6fHCWeDfOrIuOP3kpyVuQ== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51540863" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v7 04/51] build: factorise generation of the linker scripts Date: Tue, 24 Aug 2021 11:49:51 +0100 Message-ID: <20210824105038.1257926-5-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802282550100001 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 --- 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 eaf770414305..3f61682ceab7 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -255,6 +255,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 3d3b97b5b440..0edd9dee6f49 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -66,6 +66,8 @@ obj-y +=3D vpsci.o obj-y +=3D vuart.o extra-y +=3D $(TARGET_SUBARCH)/head.o =20 +extra-y +=3D xen.lds + #obj-bin-y +=3D ....o =20 ifneq ($(CONFIG_DTB_FILE),"") @@ -133,8 +135,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 462472215c91..929227f5a3ac 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -79,6 +79,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 @@ -239,6 +240,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)" @@ -291,8 +293,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 Sun May 5 07:12:38 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=1629802287; cv=none; d=zohomail.com; s=zohoarc; b=fDKdQbAbT3LdCwBxaOeIchdhLwhPpm7RTGF2tdpwgH05p8s58yJD/Ym/LFcL1yR8/nL/uouIfUCkhEgmpaE8CxcKVvW5WHYrCdSfhWN0wrrmoYdhTwbST+Pdz5uPWfUPDbr6Xw2TyVJu9xCAjHsZ8TNAFY+FYbqOQD6SFrZDjY4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802287; 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=eozzZurclujUzaGOCYS5u36KvBhGcqjHmp6JWKx+4pw=; b=C1HkJJAJL8PmZUot9uPzNGpwd9rXIhmiYqMPWrSeD9GtriC5WQHLb/l6KN4fZOAL3XlJ9HnaiU4Ux8QINwoWskTO4MTwUknUBe1itVBsdJEAaUWh57tyCl6OaQowsyp7+4JO7uP8m4RJmV25AwHHcKIk24r7JNHmFyA1fEq+29E= 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 1629802287366849.6043558139145; Tue, 24 Aug 2021 03:51:27 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170899.311943 (Exim 4.92) (envelope-from ) id 1mIU1Q-0002xs-5U; Tue, 24 Aug 2021 10:51:12 +0000 Received: by outflank-mailman (output) from mailman id 170899.311943; Tue, 24 Aug 2021 10:51:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1Q-0002xd-1t; Tue, 24 Aug 2021 10:51:12 +0000 Received: by outflank-mailman (input) for mailman id 170899; Tue, 24 Aug 2021 10:51:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1O-0001EC-8P for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:10 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 41e3a8e2-0b1f-4042-92b3-d95aab8ee7f6; Tue, 24 Aug 2021 10:50:56 +0000 (UTC) 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: 41e3a8e2-0b1f-4042-92b3-d95aab8ee7f6 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802256; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3v6VgYoCB1FiODVzXr89QZnLW/+oJafwNriPhNu9t2w=; b=WUsCYAq2xgCGpSHnndzvkYBkev1ekoIcwlzPe2WCnLQapg0CQoLfDeGe d8ih0yNPRbYjHJSuezgr+os2a0JVGuGDjktdurzYbY5sd4deBxP6Pomxp dGC250ixR/fwq6fH+bVksKUIipPisDDoz7hk8juQa+RDbPswDcO4hm8mQ 8=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: yL0OrWhAX1W40TtzPwLZ4nUazHgR76fFPZDorW3Rb1m0k82ZgSseQLRuTCz9KzFeCEx1wASUHC 4hFk3c+pv/sHwB8FGPOIddTE19z0/uZ8EY+XJk49N9/igzXegw7GCkCwTtVUpInMnkVTMPe7Tt MCf+zFscxbfZvmANlyrfVGPt/kL4l+gVEGYxxI10BvyEv6vs0GKGuP5GgYTYKFzm5ypMo9Lsk1 sA/0ENSil+riQDQvOCXyIe2kbXnPduVCbJVt1FEU5kfP/SttvfdgBJIcaT+giSTwE1PsT92OGU hTOEAk14w5gIfBHN54F5U0Se X-SBRS: 5.1 X-MesageID: 51130710 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:zfpfh6z2clbVXD+GjqmAKrPwKr1zdoMgy1knxilNoRw8SKOlfq eV7ZMmPH7P+U8ssR4b+OxoVJPsfZqYz+8W3WBzB8bHYOCFgguVxehZhOOIqQEIWReOk9K1vZ 0QFZSWY+efMbEVt6rHCXGDYrUd/OU= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51130710" 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?= , Tim Deegan Subject: [XEN PATCH v7 05/51] x86/mm: avoid building multiple .o from a single .c file Date: Tue, 24 Aug 2021 11:49:52 +0100 Message-ID: <20210824105038.1257926-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802288741100001 Content-Type: text/plain; charset="utf-8" This replace the use of a single .c file use for multiple .o file by creating multiple .c file including the first one. There's quite a few issues with trying to build more than one object file from a single source file: there's is a duplication of the make rules to generate those targets; there is an additional ".file" symbol added in order to differentiate between the object files; and the tools/symbols have an heuristic to try to pick up the right ".file". This patch adds new .c source file which avoid the need to add a second ".file" symbol and thus avoid the need to deal with those issues. Also remove __OBJECT_FILE__ from $(CC) command line as it isn't used anywhere anymore. And remove the macro "build-intermediate" since the generic rules for single targets can be used. And rename the objects in mm/hap/ to remove the extra "level". Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v7: - rename hap/guest_walk_${level}level.c to hap/guest_walk_${level}.c =20 v6: - new patch to replace both from v5: xen,symbols: rework file symbols selection build: use if_changed to build mm/*/guest_%.o =20 The changes in the patch for symbols.c was too complicated to explain, and I probably didn't realize one important fact about the tool: it deal with all *.o been concatenated to each other, without a way to figure out which symbol belong to which original file, and certainly no way to figure out if there's more than one ".file" symbol to choose from beside some fragile heuristic. xen/Makefile | 11 ----------- xen/Rules.mk | 2 +- xen/arch/x86/mm/Makefile | 9 --------- xen/arch/x86/mm/guest_walk.c | 3 --- xen/arch/x86/mm/guest_walk_2.c | 2 ++ xen/arch/x86/mm/guest_walk_3.c | 2 ++ xen/arch/x86/mm/guest_walk_4.c | 2 ++ xen/arch/x86/mm/hap/Makefile | 15 +++------------ xen/arch/x86/mm/hap/guest_walk.c | 3 --- xen/arch/x86/mm/hap/guest_walk_2.c | 2 ++ xen/arch/x86/mm/hap/guest_walk_3.c | 2 ++ xen/arch/x86/mm/hap/guest_walk_4.c | 2 ++ xen/arch/x86/mm/shadow/Makefile | 9 --------- xen/arch/x86/mm/shadow/guest_2.c | 2 ++ xen/arch/x86/mm/shadow/guest_3.c | 2 ++ xen/arch/x86/mm/shadow/guest_4.c | 2 ++ xen/arch/x86/mm/shadow/multi.c | 3 --- xen/tools/symbols.c | 18 ++---------------- 18 files changed, 24 insertions(+), 67 deletions(-) create mode 100644 xen/arch/x86/mm/guest_walk_2.c create mode 100644 xen/arch/x86/mm/guest_walk_3.c create mode 100644 xen/arch/x86/mm/guest_walk_4.c create mode 100644 xen/arch/x86/mm/hap/guest_walk_2.c create mode 100644 xen/arch/x86/mm/hap/guest_walk_3.c create mode 100644 xen/arch/x86/mm/hap/guest_walk_4.c create mode 100644 xen/arch/x86/mm/shadow/guest_2.c create mode 100644 xen/arch/x86/mm/shadow/guest_3.c create mode 100644 xen/arch/x86/mm/shadow/guest_4.c diff --git a/xen/Makefile b/xen/Makefile index 4ceb02d37441..f35a4d84f7cd 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -482,17 +482,6 @@ _MAP: %/: FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o =20 -build-intermediate =3D $(eval $(call build-intermediate-closure,$(1))) -define build-intermediate-closure -$(1): FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $$(@D) $$(@F) -endef - -$(foreach base,arch/x86/mm/guest_walk_% \ - arch/x86/mm/hap/guest_walk_%level \ - arch/x86/mm/shadow/guest_%, \ - $(foreach ext,o i s,$(call build-intermediate,$(base).$(ext)))) - .PHONY: cloc cloc: $(eval tmpfile :=3D $(shell mktemp)) diff --git a/xen/Rules.mk b/xen/Rules.mk index 3f61682ceab7..48ae519d0153 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -139,7 +139,7 @@ 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) '-D__OBJECT_FILE__= =3D"$@"' +c_flags =3D -MMD -MP -MF $(@D)/.$(@F).d $(XEN_CFLAGS) a_flags =3D -MMD -MP -MF $(@D)/.$(@F).d $(XEN_AFLAGS) =20 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index 2818c066f76a..6b7882d992bb 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -10,12 +10,3 @@ obj-$(CONFIG_MEM_SHARING) +=3D mem_sharing.o obj-y +=3D p2m.o obj-$(CONFIG_HVM) +=3D p2m-ept.o p2m-pod.o p2m-pt.o obj-y +=3D paging.o - -guest_walk_%.o: guest_walk.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_walk_%.i: guest_walk.c Makefile - $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_walk_%.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/guest_walk.c b/xen/arch/x86/mm/guest_walk.c index 30d83cf1e0e6..b9f607272c39 100644 --- a/xen/arch/x86/mm/guest_walk.c +++ b/xen/arch/x86/mm/guest_walk.c @@ -21,9 +21,6 @@ * along with this program; If not, see . */ =20 -/* Allow uniquely identifying static symbols in the 3 generated objects. */ -asm(".file \"" __OBJECT_FILE__ "\""); - #include #include #include diff --git a/xen/arch/x86/mm/guest_walk_2.c b/xen/arch/x86/mm/guest_walk_2.c new file mode 100644 index 000000000000..defcd59bc260 --- /dev/null +++ b/xen/arch/x86/mm/guest_walk_2.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 2 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/guest_walk_3.c b/xen/arch/x86/mm/guest_walk_3.c new file mode 100644 index 000000000000..1c9eca37741e --- /dev/null +++ b/xen/arch/x86/mm/guest_walk_3.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 3 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/guest_walk_4.c b/xen/arch/x86/mm/guest_walk_4.c new file mode 100644 index 000000000000..aa3900338a2d --- /dev/null +++ b/xen/arch/x86/mm/guest_walk_4.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 4 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/hap/Makefile b/xen/arch/x86/mm/hap/Makefile index c6d296b51720..8ef54b1faa50 100644 --- a/xen/arch/x86/mm/hap/Makefile +++ b/xen/arch/x86/mm/hap/Makefile @@ -1,15 +1,6 @@ obj-y +=3D hap.o -obj-y +=3D guest_walk_2level.o -obj-y +=3D guest_walk_3level.o -obj-y +=3D guest_walk_4level.o +obj-y +=3D guest_walk_2.o +obj-y +=3D guest_walk_3.o +obj-y +=3D guest_walk_4.o obj-y +=3D nested_hap.o obj-y +=3D nested_ept.o - -guest_walk_%level.o: guest_walk.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_walk_%level.i: guest_walk.c Makefile - $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_walk_%level.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/hap/guest_walk.c b/xen/arch/x86/mm/hap/guest_w= alk.c index f59ebc84a290..832a8058471e 100644 --- a/xen/arch/x86/mm/hap/guest_walk.c +++ b/xen/arch/x86/mm/hap/guest_walk.c @@ -18,9 +18,6 @@ * this program; If not, see . */ =20 -/* Allow uniquely identifying static symbols in the 3 generated objects. */ -asm(".file \"" __OBJECT_FILE__ "\""); - #include #include #include diff --git a/xen/arch/x86/mm/hap/guest_walk_2.c b/xen/arch/x86/mm/hap/guest= _walk_2.c new file mode 100644 index 000000000000..defcd59bc260 --- /dev/null +++ b/xen/arch/x86/mm/hap/guest_walk_2.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 2 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/hap/guest_walk_3.c b/xen/arch/x86/mm/hap/guest= _walk_3.c new file mode 100644 index 000000000000..1c9eca37741e --- /dev/null +++ b/xen/arch/x86/mm/hap/guest_walk_3.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 3 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/hap/guest_walk_4.c b/xen/arch/x86/mm/hap/guest= _walk_4.c new file mode 100644 index 000000000000..aa3900338a2d --- /dev/null +++ b/xen/arch/x86/mm/hap/guest_walk_4.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 4 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makef= ile index fd64b4dda925..b4a1620b6920 100644 --- a/xen/arch/x86/mm/shadow/Makefile +++ b/xen/arch/x86/mm/shadow/Makefile @@ -5,12 +5,3 @@ obj-$(CONFIG_PV) +=3D pv.o guest_4.o else obj-y +=3D none.o endif - -guest_%.o: multi.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_%.i: multi.c Makefile - $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_%.s: multi.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/shadow/guest_2.c b/xen/arch/x86/mm/shadow/gues= t_2.c new file mode 100644 index 000000000000..288b229982b0 --- /dev/null +++ b/xen/arch/x86/mm/shadow/guest_2.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 2 +#include "multi.c" diff --git a/xen/arch/x86/mm/shadow/guest_3.c b/xen/arch/x86/mm/shadow/gues= t_3.c new file mode 100644 index 000000000000..04e17b0b8adc --- /dev/null +++ b/xen/arch/x86/mm/shadow/guest_3.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 3 +#include "multi.c" diff --git a/xen/arch/x86/mm/shadow/guest_4.c b/xen/arch/x86/mm/shadow/gues= t_4.c new file mode 100644 index 000000000000..c0c5d3cb11ad --- /dev/null +++ b/xen/arch/x86/mm/shadow/guest_4.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 4 +#include "multi.c" diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 8bb028c2e2fa..7207fcf9e75f 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -20,9 +20,6 @@ * along with this program; If not, see . */ =20 -/* Allow uniquely identifying static symbols in the 3 generated objects. */ -asm(".file \"" __OBJECT_FILE__ "\""); - #include #include #include diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c index 0b124526165d..710e9785d348 100644 --- a/xen/tools/symbols.c +++ b/xen/tools/symbols.c @@ -84,7 +84,6 @@ static int read_symbol(FILE *in, struct sym_entry *s) { char str[500], type[20] =3D ""; char *sym, stype; - static enum { symbol, single_source, multi_source } last; static char *filename; int rc =3D -1; =20 @@ -118,24 +117,11 @@ static int read_symbol(FILE *in, struct sym_entry *s) */ input_format =3D=3D fmt_sysv && !*type && stype =3D=3D '?' && sym && sym[1] && strchr("cSsoh", sym[1]) && !sym[2])) { - /* - * gas prior to binutils commit fbdf9406b0 (expected to appear - * in 2.27) outputs symbol table entries resulting from .file - * in reverse order. If we get two consecutive file symbols, - * prefer the first one if that names an object file or has a - * directory component (to cover multiply compiled files). - */ - bool multi =3D strchr(str, '/') || (sym && sym[1] =3D=3D 'o'); - - if (multi || last !=3D multi_source) { - free(filename); - filename =3D *str ? strdup(str) : NULL; - } - last =3D multi ? multi_source : single_source; + free(filename); + filename =3D *str ? strdup(str) : NULL; goto skip_tail; } =20 - last =3D symbol; rc =3D -1; =20 sym =3D str; --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802293; cv=none; d=zohomail.com; s=zohoarc; b=JkRrWuWTKw2e36TH1oiceAdwwwY6q1BB4QgKH2HpkDs5klnDXqD+3UdVtn8aq8nShsUeVmvcYQbzF5CqwuKif6ECbnEKILtsHJrTE2+Xo42weP2CCJTNtYIJAMRWrO1EG/74AVOzwlxYf4wODzYyXuMrCak0qC/D2ZoKjohAQ1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802293; 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=PtTXWNQYiPUt1jAw56Db0p9DCfOkcdkSOScUN7VpLxk=; b=XZfmWlq0b0K9LT+go+Vqkd1RroA5oHEPk7Xww/mIVbcX8QwngopYm0UiSqdnCKq7Scg4OtM7ezEktuGB4W4ckNwnna1DolvqyeSFN+kDyFibCRhlOM0Tol1+Z4pNkZwCNOZH7WiEbvwJ+lzJ4cLhAr9u0x+am/zzLiUdR+1Ijh0= 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 1629802293263148.0938896193186; Tue, 24 Aug 2021 03:51:33 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170902.311954 (Exim 4.92) (envelope-from ) id 1mIU1U-0003aa-HB; Tue, 24 Aug 2021 10:51:16 +0000 Received: by outflank-mailman (output) from mailman id 170902.311954; Tue, 24 Aug 2021 10:51:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1U-0003aO-Bk; Tue, 24 Aug 2021 10:51:16 +0000 Received: by outflank-mailman (input) for mailman id 170902; Tue, 24 Aug 2021 10:51:15 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1T-0001EC-8L for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:15 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a7d11996-2282-4cd7-9e1f-89089d3a8aef; Tue, 24 Aug 2021 10:50:57 +0000 (UTC) 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: a7d11996-2282-4cd7-9e1f-89089d3a8aef DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802257; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Co6H7lVgiBUcy/feyke8bR5ma3P4dUmv5ksGl3mwp9c=; b=RyECNtla7WtKLhP5VrS8g/QrmUQJMJolbUA1qa5P6/f491WdC9XijfJP mpPQre//fSm6xIB0DjId1zlqVhjjZMt0kYZ+j+UXUeNiyJ+zfMrJ+m+LU rZFZnIkkn3D0GTnY88jBQr8DgAXmFbAHvBJZZeU1BLyJvANXOS0arcsaC o=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 3p1CextGzq0q9aOS4LAZ0UORCqraVkDsfc8ZpkLWAm/jshJ1BrfugFW/tAN4978p8Zbeh0HTYH +o6E6ZTkmAY19T3sZccjzvO9k2K8N3Sd1HOW2bm328Bu2iJJWN/SkHpIuWLub6TXJ/l9i7WHVA i6e/qN2PRifvasRCLCqBBkTUvi15uhJocjwq++34kURssTIAI3gPcIDbMHzui08WDLoFqL/E9e 9vIFOhVtWDy332c4aKbix3jMJcSO+0w5uwMgEiirF/Joqi8R+rcCYHetqbaRnxLn6mk422Ub/i DNXXlDvNm3di2srvJsL160cj X-SBRS: 5.1 X-MesageID: 52875430 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:/dW1DqGBbYKpD/ZypLqFVJHXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskd2ZJkh8erhBEDyewKkyXcV2/hbAV7MZniDhILFFu9fBOjZsnfd8k/Fh4lgPM 5bGsATZ+EYZmIK7voSlTPIdurIt+P3kpxA692+815dCSVRL41w5QZwDQiWVmdsQhNdOJY/HJ 2AouJaujuJYx0sH4iGL0hAe9KGi8zAlZrgbxJDLQUg8hOygTSh76O/OwSE3y0ZTyhEzd4ZgC f4ek3Cl+ueWsOAu1/hPlzontdrcRzau5l+7fm3+4kow/PX+0OVjcpaKvm/VXsO0ZmSAR4R4a LxSlEbTolOAjrqDxuIiAqo1A/63Dk07Xj+jVeenHv4uMT8ACk3EsxbmOtiA23kAmcbzaVBOZ hwrhWkXltsfGL9tTW448KNWwBhl0Kyr3ZnmekPj2ZHWY9bbLNKt4QQ8E5cDZ9FRUvBmcgaOf grCNuZ6OddcFucYXyctm5zwMa0VnB2GhudWEANtsGczjATlnFkyEkTwtAZgx47hdsAYogB4/ 6BPrVjlblIQMNTZaVhBP0ZSc/yEWDJSQKkChPmHb0mLtB0B5vpke+I3FwY3pDXRHU49upApH 2aaiIkiYcbQTOQNeSemIZM7g3ABH6gWDiF8LAv26RE X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="52875430" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 06/51] build,include: rework compat-build-source.py Date: Tue, 24 Aug 2021 11:49:53 +0100 Message-ID: <20210824105038.1257926-7-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802295345100001 Content-Type: text/plain; charset="utf-8" Improvement are: - give the path to xlat.lst as argument - include `grep -v` in compat-build-source.py script, we don't need to write this in several scripted language. No changes in final compat/%.h headers. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v7: - actually keep the dependency on Makefile =20 v6: - remove dependency on Makefile as it's not needed anymore =20 v5: - removed "have 'xlat.lst' path as a variable" from the patch. =20 v4: - new patch xen/include/Makefile | 3 +-- xen/tools/compat-build-source.py | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index c8ca97eed0fc..4fa10e68f997 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -61,8 +61,7 @@ compat/%.i: compat/%.c Makefile =20 compat/%.c: public/%.h xlat.lst Makefile $(BASEDIR)/tools/compat-build-sou= rce.py mkdir -p $(@D) - grep -v 'DEFINE_XEN_GUEST_HANDLE(long)' $< | \ - $(PYTHON) $(BASEDIR)/tools/compat-build-source.py >$@.new + $(PYTHON) $(BASEDIR)/tools/compat-build-source.py xlat.lst <$< >$@.new mv -f $@.new $@ =20 compat/.xlat/%.h: compat/%.h compat/.xlat/%.lst $(BASEDIR)/tools/get-field= s.sh Makefile diff --git a/xen/tools/compat-build-source.py b/xen/tools/compat-build-sour= ce.py index 2bcaf27d05a3..274d6917ab7f 100755 --- a/xen/tools/compat-build-source.py +++ b/xen/tools/compat-build-source.py @@ -13,7 +13,11 @@ pats =3D [ [ r"XEN_GUEST_HANDLE", r"COMPAT_HANDLE" ], ]; =20 -xlatf =3D open('xlat.lst', 'r') +try: + xlatf =3D open(sys.argv[1], 'r') +except IndexError: + print('missing path to xlat.lst argument') + sys.exit(1) for line in xlatf.readlines(): match =3D re.subn(r"^\s*\?\s+(\w*)\s.*", r"\1", line.rstrip()) if match[1]: @@ -25,6 +29,8 @@ for pat in pats: pat[0] =3D re.compile(pat[0]) =20 for line in sys.stdin.readlines(): + if 'DEFINE_XEN_GUEST_HANDLE(long)' in line: + continue for pat in pats: line =3D re.sub(pat[0], pat[1], line) print(line.rstrip()) --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802296; cv=none; d=zohomail.com; s=zohoarc; b=HDoGtNHwA2B//5p2ixlYj1AIfO9NXnHJPxzneYj9Uwt95+jIqHkaDLvh+qgUsY7yrtpzy0fe7K2W2ZX4Ufu4m8CwaBrXXRjQRoC3yCiIeW3j/SwmnA15yG1p8PQX03DCPrsAT0wM82s8srO4za9OI2v/EZ20yq6GD9u3oSu9R5I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802296; 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=UCnSJ/1rjJnK+t9CHNLRLfYT+2Gx0mZSnp2ECmAIne8=; b=XLoLOdeNa5Iz/fzM4upxW+qg9qm1ijUFruIIbI7VEccIiC4N77TLy5r5bPZIPHSDqzVAkoTSc35cnibzwXTQ/oZLStcP8FpGw7t2Q2zgvUZjGMVfMOe0IPMN2D419SIsItqV91H0Op8rt+djrVC9J0zKNi6LZeU5o7Et53/I2Cc= 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 1629802296662789.9403877148551; Tue, 24 Aug 2021 03:51:36 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170908.311965 (Exim 4.92) (envelope-from ) id 1mIU1a-0004EU-2U; Tue, 24 Aug 2021 10:51:22 +0000 Received: by outflank-mailman (output) from mailman id 170908.311965; Tue, 24 Aug 2021 10:51:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1Z-0004EJ-VO; Tue, 24 Aug 2021 10:51:21 +0000 Received: by outflank-mailman (input) for mailman id 170908; Tue, 24 Aug 2021 10:51:20 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1Y-0001EC-8c for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:20 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ab10c055-d9a1-4273-af9f-d01a7cf118ec; Tue, 24 Aug 2021 10:50:59 +0000 (UTC) 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: ab10c055-d9a1-4273-af9f-d01a7cf118ec DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802259; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bL9YzgcK9j7B9sQjCTznPaTPzCmp5IsYcEeL7e+0Qqw=; b=iE3p3f/KKDcv6K50PpuZLtPlmNbpFNl6N8uYKz4BZHycmkTZfaUIhKsH z+6IQQoIQwbf6Ol2nTFtBpBRhl3YLh6dgwU20K7jBxJdIaDiB88knsEkW kvd2zbY+U9n5QhtugINJcFVJ19bNS5biFl2a8B05zEhn2RyQ78cLX1Juy c=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: u5dnNFc5aE5Gc8GOmsJN0+wIApDq6LGZASTLbcLPe5VrER6GeEjP8h3ZkfASe1pXAK95G+1YHx jtqZvyjnhBNKOgD6s6/I0kBg6iBMI/6qA4nDYJh+6DE01whLxsyD31Ds2DKrQLgke+3KJnrFZ5 l4p5LBe/T/xLlxJP5bcAhfJAzoe1OEBOjDVJISRhwdNoVdHIv+6uqAUbWReMo1CF8QUCCOcPdi VNJQ+eH6sySXIegxluQxARnGQ06HeQ0hSzJPUEl/nW/IbX776S/rliPf1B2H1fPWcZ//VubD5L CxLUbg9A8rjOH7ST+N950r/r X-SBRS: 5.1 X-MesageID: 50772170 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:nx4COa2SNhlwRaQsvsoEiwqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="50772170" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Andrew Cooper" , George Dunlap , Ian Jackson , Jan Beulich , "Julien Grall" , Stefano Stabellini Subject: [XEN PATCH v7 07/51] build,include: rework compat-build-header.py Date: Tue, 24 Aug 2021 11:49:54 +0100 Message-ID: <20210824105038.1257926-8-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802297608100003 Content-Type: text/plain; charset="utf-8" Replace a mix of shell script and python script by all python script. No change to the final generated headers. Signed-off-by: Anthony PERARD Acked-by: Wei Liu --- Notes: v7: - actually keep the dependency on Makefile =20 v6: - removed handling of $(prefix-y) and $(suffix-y), they've been removed. - remove dependency on Makefile as it's not needed anymore - rebased =20 v5: - Removed -P from CPP when generating compat/%.i -> keep removing linemarkers and keep de-duplicating empty lines. So that all the blank line that currently exist in the generated headers stays in place. =20 v4: - new patch xen/include/Makefile | 9 +------ xen/tools/compat-build-header.py | 44 ++++++++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index 4fa10e68f997..95daa8a28975 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -46,14 +46,7 @@ public-$(CONFIG_ARM) :=3D $(wildcard public/arch-arm/*.h= public/arch-arm/*/*.h) all: $(headers-y) =20 compat/%.h: compat/%.i Makefile $(BASEDIR)/tools/compat-build-header.py - set -e; id=3D_$$(echo $@ | tr '[:lower:]-/.' '[:upper:]___'); \ - echo "#ifndef $$id" >$@.new; \ - echo "#define $$id" >>$@.new; \ - echo "#include " >>$@.new; \ - $(if $(filter-out compat/arch-%.h,$@),echo "#include <$(patsubst compat/%= ,public/%,$@)>" >>$@.new;) \ - grep -v '^# [0-9]' $< | \ - $(PYTHON) $(BASEDIR)/tools/compat-build-header.py | uniq >>$@.new; \ - echo "#endif /* $$id */" >>$@.new + $(PYTHON) $(BASEDIR)/tools/compat-build-header.py <$< $@ >>$@.new; \ mv -f $@.new $@ =20 compat/%.i: compat/%.c Makefile diff --git a/xen/tools/compat-build-header.py b/xen/tools/compat-build-head= er.py index 065d3b1b6ee8..5f5474fba051 100755 --- a/xen/tools/compat-build-header.py +++ b/xen/tools/compat-build-header.py @@ -2,6 +2,12 @@ =20 import re,sys =20 +try: + maketrans =3D str.maketrans +except AttributeError: + # For python2 + from string import maketrans + pats =3D [ [ r"__InClUdE__(.*)", r"#include\1" ], [ r"__IfDeF__ (XEN_HAVE.*)", r"#ifdef \1" ], @@ -23,7 +29,41 @@ pats =3D [ [ r"(^|[^\w])long([^\w]|$$)", r"\1int\2" ] ]; =20 +output_filename =3D sys.argv[1] + +# tr '[:lower:]-/.' '[:upper:]___' +header_id =3D '_' + \ + output_filename.upper().translate(maketrans('-/.','___')) + +header =3D """#ifndef {0} +#define {0} +#include """.format(header_id) + +print(header) + +if not re.match("compat/arch-.*.h$", output_filename): + x =3D output_filename.replace("compat/","public/") + print('#include <%s>' % x) + +last_line_empty =3D False for line in sys.stdin.readlines(): + line =3D line.rstrip() + + # Remove linemarkers generated by the preprocessor. + if re.match(r"^# \d", line): + continue + + # De-duplicate empty lines. + if len(line) =3D=3D 0: + if not last_line_empty: + print(line) + last_line_empty =3D True + continue + else: + last_line_empty =3D False + for pat in pats: - line =3D re.subn(pat[0], pat[1], line)[0] - print(line.rstrip()) + line =3D re.sub(pat[0], pat[1], line) + print(line) + +print("#endif /* %s */" % header_id) --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802305; cv=none; d=zohomail.com; s=zohoarc; b=SxTfg8v+YB/+JJhryEpy3DIKkdDzLz0rwwYYip/36O1ywJtZwPgO44MuYpGd00/3ytW/7LRFBMPvHkSfFN1wrU6fu0vZ+XiZWXy5S2ZA2f+7uZ9UWW3+5foDPT1NtSVC4umZdaJuH0PNkafKN/gFfC8tQ6VgQnomf0XSOiPtO98= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802305; 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=+74j9iio2rDzp3cuGagOG5cIE8MYTDsng5Y+WdY1gOo=; b=loQErAuQbDofxscs2CkxbXlhgTW7flD6UqfIYxjI/RQX69OyyW5v2V6yYzQ2ERc5ir6Jbhv8qbrzYj+CHjr2JBqbytYhH7Qoy3xgOGTF/Y5HwRe7cXnemVTqdcQoMoJHOZDS97bhMImr/XD/kTUK0Fcg9KikycY7Tbl92W01TxI= 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 1629802305625477.83322534913157; Tue, 24 Aug 2021 03:51:45 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170913.311976 (Exim 4.92) (envelope-from ) id 1mIU1f-0004mE-Ay; Tue, 24 Aug 2021 10:51:27 +0000 Received: by outflank-mailman (output) from mailman id 170913.311976; Tue, 24 Aug 2021 10:51:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1f-0004m5-6w; Tue, 24 Aug 2021 10:51:27 +0000 Received: by outflank-mailman (input) for mailman id 170913; Tue, 24 Aug 2021 10:51:25 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1d-0001EC-8p for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:25 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ddfb5660-2b70-4538-b3e4-29642c14e627; Tue, 24 Aug 2021 10:51:02 +0000 (UTC) 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: ddfb5660-2b70-4538-b3e4-29642c14e627 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802261; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VYSylFgL3OrKmloanpbNZC7EqqdXJeoQnSFUl8Se9ag=; b=A5y0TZ2T9G8hGP4o4DlCV9idx0P/naEZtsVVgEHPbs1PGhYTHi0lbC8x +ryRBlB3vDZFennQC3jbGBddbo0ST6ner6xHe90wWVGKI5zpjPl7BFuvh VORP9oFpRDVSk303fbdspGChPiLBGeQUmuGhSdCQMAE1FIlscY8Pyb1Y+ s=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: Ndfau1ELZ/b//XxcvHRBqBwrrlEUcpQF1l+UJe5JQuF8WArUHl7/GO50A/5WWZiilPWmQnLc8u jfkxdy/+hd2pxrdoYV2+/Wn8lGZY3M9N8s9yhCgsVkLURO7BuTAPAUWsXgXR9S+3xESitOsQM1 pThWyBGW4SimBQ9wKmDPYFRZOq/YCk4J2qAbQ6yLxAMydDDNuo/sI3DRjSc9bFxRh3zbai/Pom hOgYxHjaswJSLy/8aEEXNMV82kC35ZISesARRi2QuXnqA8QTb8XJ7l0/zwT+5PfJp7rXvQ2Jnn 8mWX1fXxxcdQNnE3Y24Mi6Sh X-SBRS: 5.1 X-MesageID: 51166340 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:6xLTBaGXYTMjgWa6pLqEEseALOsnbusQ8zAXPiBKJCC9vPb5qy nOpoV+6faQslwssR4b9uxoVJPvfZq+z+8R3WByB8bAYOCOggLBQL2KhbGI/9SKIVydygcy78 Zdm6gVMqyMMbB55/yKnDVRxbwbsaa6GKPDv5ah8590JzsaDJ2Jd21Ce32m+ksdfnghObMJUK Cyy+BgvDSadXEefq2AdwM4t7iqnayzqHr+CyR2fyIa1A== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51166340" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 08/51] build: fix clean targets when subdir-y is used Date: Tue, 24 Aug 2021 11:49:55 +0100 Message-ID: <20210824105038.1257926-9-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802306717100001 Content-Type: text/plain; charset="utf-8" The make variable $(subdir-y) isn't used yet but will be in a following patch. Anything in $(subdir-y) doesn't to have a '/' as suffix as we already now it's a directory. Rework the rules so that it doesn't matter whether there is a '/' or not. It also mimic more closely to the way Linux's Kbuild descend in subdirectories. FORCE phony target isn't needed anymore running clean, so it can be removed. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/scripts/Makefile.clean | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index 53379e6102cc..027c200c0efc 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -12,19 +12,18 @@ include Makefile # 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 subdir-all :=3D $(subdir-y) $(subdir-n) $(subdir-) \ - $(filter %/, $(obj-y) $(obj-n) $(obj-)) + $(patsubst %/,%, $(filter %/, $(obj-y) $(obj-n) $(obj-))) =20 DEPS_RM =3D $(DEPS) $(DEPS_INCLUDE) .PHONY: clean -clean:: $(addprefix _clean_, $(subdir-all)) +clean:: $(subdir-all) rm -f *.o .*.o.tmp *~ core $(DEPS_RM) =20 # Descending # ------------------------------------------------------------------------= --- =20 -_clean_%/: FORCE - $(MAKE) $(clean) $* +PHONY +=3D $(subdir-all) +$(subdir-all): + $(MAKE) $(clean) $@ =20 -# Force execution of pattern rules (for which PHONY cannot be directly use= d). -.PHONY: FORCE -FORCE: +.PHONY: $(PHONY) --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802313; cv=none; d=zohomail.com; s=zohoarc; b=XXaODRasD7XXGRdp4l2Vdj7zVL3opvd8Fseb8Vx4/P1jH03qJ3EUu/UQLhKq4MgTg+3BS9NQ91wGyW6CBD++5TxfREVtnmXvPo0jk7HXGnS3ff2hGfn4kX0FcQSbuITWgsn2ZbqinGy3BTjPbYCq9bZFznCzbQDBA6I7XwpYNwk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802313; 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=3C2XGJpKdL7eEM5pz5kBplF6YUrWs+vHiSSR7PomSE0=; b=U+paj937q5thlX/jDVFT4mfIz3AboACBPw53jkfmdnCf0oY9QqdSYyqAM6WJL6DvbpeA3SGYXxp78LLjxxEG7QkayruPqffOwX/cEa2546bnAwqBEdosYi+srhS+Jjq41YuRhVVOAIj3VvdOh1u86fVFN6Q2p4C0yQzW+8u6e+Y= 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 1629802313503425.8041364857195; Tue, 24 Aug 2021 03:51:53 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170918.311998 (Exim 4.92) (envelope-from ) id 1mIU1k-0005dQ-22; Tue, 24 Aug 2021 10:51:32 +0000 Received: by outflank-mailman (output) from mailman id 170918.311998; Tue, 24 Aug 2021 10:51:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1j-0005dI-UV; Tue, 24 Aug 2021 10:51:31 +0000 Received: by outflank-mailman (input) for mailman id 170918; Tue, 24 Aug 2021 10:51:30 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1i-0001EC-9F for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:30 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 7e70fb7b-8b13-40da-bd22-5cd12aced9c2; Tue, 24 Aug 2021 10:51:03 +0000 (UTC) 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: 7e70fb7b-8b13-40da-bd22-5cd12aced9c2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802263; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aeF7Kv7O4DhLszrRehfv9wqocK16xFjPyQnD/pOHJvE=; b=igjrcCscg2+nQDxvLdIdD4T0XMV76WNL5ZpWZIXuzuh9ujZvH/vtmDz3 BZm3Avo6U85Z00OZhOh3CfxdC8Of8V1Im/9qODLaqFPxTp8J+laHJKxjT 4M7xrGjWOI7At4ASCRVhbV0x/m0BzJO0ozIXmGHE8BPVIoAh8oSY3v9xe c=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: lrXu+DHBj+AeJaQBq0MAWxjoaL+0yaNtvNLPbzW7baavHMgkl8cjdAqAkexlhzmLQ4WR6eARv6 a/XimwmpGrzwO5wKaQcbn7T/5QXtJLemMfst68o/hJgdvNSYMiqd0eQk2gAhmc7v2o89OcwZlx ET20SgetBXTvgdyfB5GoowYYoE+635KSqg1Zyyi6tI0wwI8pWvLyMZij9j7yh9XqxGlGk22MFd GZwM1Lm+443lfyEpLorAtdn1pbELskKkUWnk9UL7oAL6wG+GfR+kKWnCGtiMXqXJLTYQRb1tuH pIEo8LsyN/S1m7SitTUMMxHU X-SBRS: 5.1 X-MesageID: 51153521 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:3VkvwKPCKF354MBcT33155DYdb4zR+YMi2TDiHoddfUFSKalfp 6V98jzjSWE7gr4WBkb+exoS5PwOE80lKQFqrX5Uo3SODUO1FHHEGgA1/qp/9SDIVyYygc178 4JH8dD4bbLfDtHZLPBkWyF+qEbsbu6Gc6T5Nv2/jNId0VHeqtg5wB2BkKwCUttXjRLApI/Cd 61+tdHjyDIQwVaUu2LQl0+G8TTrdzCk5zrJTQcAQQ81QWIhTS0rJbnDhmj2AsEWT8n+8ZszY GFqX222kyQiYD69vbu7R6R032Qoqqi9jJ3Pr3MtiHSEESotu/nXvUkZ1TIhkFMnAjm0idQrD CLmWZsAy070QKqQkil5RTqwAXuyzAo9jvrzkKZm2LqpYjjSCs9ENcpv/MuTvL10TtVgDhH6t M944tZjesnMTrQ2CDmo9TYXRBjkUS55XIkjO4IlnRaFY8TcqVYo4AT9F5cVM5oJlOz1Kk3VO 11SM3M7vdfdl2XK3jfo2l02dSpGnA+BA2PTEQOstGclzJWgHd6xU0Fw9F3pAZIyLstD51fo+ jUOKVhk79DCscQcKJmHe8EBdC6D2TcKCi8RV564W6XZp3vHki91aIfzI9FmN1CSaZ4v6fawq 6xLW+wnVRCBH7GGImU2oFX/lTXXGCwNA6duv1j2w== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51153521" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 09/51] build: use subdir-y in test/Makefile Date: Tue, 24 Aug 2021 11:49:56 +0100 Message-ID: <20210824105038.1257926-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802315117100003 Content-Type: text/plain; charset="utf-8" This allows Makefile.clean to recurse into livepatch without help. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/test/Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/xen/test/Makefile b/xen/test/Makefile index aaa499664396..41e4d7bdb78b 100644 --- a/xen/test/Makefile +++ b/xen/test/Makefile @@ -4,15 +4,10 @@ tests all: build =20 ifneq ($(XEN_TARGET_ARCH),x86_32) # Xen 32-bit x86 hypervisor no longer supported, so has no test livepatches -SUBDIRS +=3D livepatch +subdir-y +=3D livepatch endif =20 install build subtree-force-update uninstall: %: - set -e; for s in $(SUBDIRS); do \ + set -e; for s in $(subdir-y); do \ $(MAKE) -f $(BASEDIR)/Rules.mk -C $$s $*; \ done - -clean:: - set -e; for s in $(SUBDIRS); do \ - $(MAKE) -f $(BASEDIR)/Rules.mk -C $$s $@; \ - done --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802312; cv=none; d=zohomail.com; s=zohoarc; b=IcO8pDAehWCM1eb1XyGjMRodGUyvhoZyrkNxwYQgMyZ2FzyA+SyPB3Q2m5hJWoED37PAdMij2BRFvYyAVaX3PB8wdJ5jQdntoEgaG2HXDo3ACCo2P52sqjTBdRMc7baZAD30O7ic47+9UR0oD77qHhQxB0xXIvDbQe9nc7h227w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802312; 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=ixBHTXI55a6ZLxn4/hINdtwUiA0zerKFWjaRtxWxf9I=; b=jmPZqePs5AuIJ522g7o2YJmt0PUbjIZMksEA7Qa0GRM9rksbccVe5kvcXlH1hEabpD2t/1GduVCJ2W1BHl8BiDft+zYvs8Aw63PgIlsPoKxArfEqwIAKOOYmMzFdZGMKEQb9LEtrvZ+2gHbYGxv71RXrzx0vKctpm4MXcxPiWwU= 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 1629802312053550.7240616081065; Tue, 24 Aug 2021 03:51:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170922.312020 (Exim 4.92) (envelope-from ) id 1mIU1o-0006Uo-8x; Tue, 24 Aug 2021 10:51:36 +0000 Received: by outflank-mailman (output) from mailman id 170922.312020; Tue, 24 Aug 2021 10:51: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 1mIU1o-0006UR-0r; Tue, 24 Aug 2021 10:51:36 +0000 Received: by outflank-mailman (input) for mailman id 170922; Tue, 24 Aug 2021 10:51:35 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1n-0001EC-9I for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:35 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 76f38e87-9105-480e-a83f-4a7dfa7b7b1a; Tue, 24 Aug 2021 10:51:04 +0000 (UTC) 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: 76f38e87-9105-480e-a83f-4a7dfa7b7b1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802264; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uLKI3ja1OUbts2SnkXQR8tTgRcFYuztp8ELRrsey8HY=; b=VYroVH00n+ybuBn09VsyLn6GKpPdtSExr2nwZuXe09BMtGNsW7GtYt2z FrumIXCDB5RQyK5WpIE5PAx69ZLVZJbqtsWdtWbi7i+RC8q471utsOFO3 SNmk7Sezft0TsysWWdkGrRaIezX6+YjpnovEZ2ocSur4Hai10Jla/Opov s=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 2oW+qoLJIU6VIRXe3KMj3mwIx+b59bIH+EIZhKH3DjENHu4zGYYHdIOv2UbL0i18aysFS9ZWa7 GVDf4YPj1m+r7A+u5hN3WrPiK2JTCpFk61coLiaCp4iMchmd7srIPvFNNIwIcmCGAP7AdPI4aa SYmUz2tI5k0/KvZ96nZ6rOVxt4OSAFd3HtG1C4LGHt2ocJHcR/EfukDG63NizZAGeuD03lrxjy mzLS44BAcbPKCGdZEiuTBAIfr8vguqURFTGqHIoODQKEGKYny0DzN8dWSsQXJp5lL1GavEI6gi P2+Zdi9jqU5UNwfFOXu89w3G X-SBRS: 5.1 X-MesageID: 52875438 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:PjfI8aHoydIMXuc1pLqFVJHXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskd2ZJkh8erhBEDyewKkyXcV2/hbAV7MZniDhILFFu9fBOjZsnfd8k/Fh4lgPM 5bGsATZ+EYZmIK7voSlTPIdurIt+P3kpxA692+815dCSVRL41w5QZwDQiWVmdsQhNdOJY/HJ 2AouJaujuJYx0sH4iGL0hAe9KGi8zAlZrgbxJDLQUg8hOygTSh76O/OwSE3y0ZTyhEzd4ZgC f4ek3Cl+ueWsOAu1/hPlzontdrcRzau5l+7fm3+4kow/PX+0OVjcpaKvm/VXsO0ZmSAR4R4a LxSlEbTolOAjrqDxuIiAqo1A/63Dk07Xj+jVeenHv4uMT8ACk3EsxbmOtiA23kAmcbzaVBOZ hwrhWkXltsfGL9tTW448KNWwBhl0Kyr3ZnmekPj2ZHWY9bbLNKt4QQ8E5cDZ9FRUvBmcgaOf grCNuZ6OddcFucYXyctm5zwMa0VnB2GhudWEANtsGczjATlnFkyEkTwtAZgx47hdsAYogB4/ 6BPrVjlblIQMNTZaVhBP0ZSc/yEWDJSQKkChPmHb0mLtB0B5vpke+I3FwY3pDXRHU49upApH 2aaiIkiYcbQTOQNeSemIZM7g3ABH6gWDiF8LAv26RE X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="52875438" From: Anthony PERARD To: CC: Anthony PERARD , Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [XEN PATCH v7 10/51] build,arm: move LDFLAGS change to arch.mk Date: Tue, 24 Aug 2021 11:49:57 +0100 Message-ID: <20210824105038.1257926-11-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802313140100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anthony PERARD Acked-by: Julien Grall --- xen/arch/arm/Makefile | 8 -------- xen/arch/arm/arch.mk | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 0edd9dee6f49..3d0af8ebc93c 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -104,14 +104,6 @@ prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE $(call if_changed,ld) endif =20 -ifeq ($(CONFIG_ARM64_ERRATUM_843419),y) - ifeq ($(call ld-option, --fix-cortex-a53-843419),n) - $(warning ld does not support --fix-cortex-a53-843419; xen may be = susceptible to erratum) - else - XEN_LDFLAGS +=3D --fix-cortex-a53-843419 - endif -endif - targets +=3D prelink.o =20 $(TARGET)-syms: prelink.o xen.lds diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index 11caec86ba14..6a2982059486 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -17,3 +17,11 @@ $(call cc-option-add,CFLAGS-$(CONFIG_ARM_64),CC,-mno-out= line-atomics) ifneq ($(filter command line environment,$(origin CONFIG_EARLY_PRINTK)),) $(error You must use 'make menuconfig' to enable/disable early printk = now) endif + +ifeq ($(CONFIG_ARM64_ERRATUM_843419),y) + ifeq ($(call ld-option, --fix-cortex-a53-843419),n) + $(warning ld does not support --fix-cortex-a53-843419; xen may be = susceptible to erratum) + else + LDFLAGS +=3D --fix-cortex-a53-843419 + endif +endif --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802317; cv=none; d=zohomail.com; s=zohoarc; b=IF2J6YqN3Ef+mMswqdyQ/xIG/eKlH/F3u1OlOoVpc9wpTX4kjLqeOtFZ5FKIX1KXXiTLvkutXgbHRYpFK4H/3gFoZvSsJreSzdNwiVTMJsiOEmpSa3aK/KE1FZOFU1ZLulPIRXSYzjmTH4Kf8+YP4O4qhGHvb2iwn8ssipSx7RE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802317; 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=EnmgbEOpYazcc/gXG2DMNhV40B8JbVd1jlqL099WjgU=; b=C/Jd52nQMDynn4naZkk8GPqUhz+q+6ddrIfNI2kKnSL/os2sWhMUgFVCpZrJ7isjZsbQKo7WY20abgo1OilVfb4ctJQMTFeY95KE3ADFYeUe1UKHVyfcwjhPWIVPAbdSpdmDmvgUncjDy6LpFwuWvpngau7ssfKZrsjxZ2o9v1w= 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 1629802317503802.4993072953777; Tue, 24 Aug 2021 03:51:57 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170928.312031 (Exim 4.92) (envelope-from ) id 1mIU1t-0007II-JA; Tue, 24 Aug 2021 10:51:41 +0000 Received: by outflank-mailman (output) from mailman id 170928.312031; Tue, 24 Aug 2021 10:51:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1t-0007I3-EV; Tue, 24 Aug 2021 10:51:41 +0000 Received: by outflank-mailman (input) for mailman id 170928; Tue, 24 Aug 2021 10:51:40 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1s-0001EC-9R for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:40 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e4a9e43c-6982-480e-9a20-723681e4cb13; Tue, 24 Aug 2021 10:51:06 +0000 (UTC) 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: e4a9e43c-6982-480e-9a20-723681e4cb13 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802266; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=b7uRuMBIULvFTfFL0MTl+k+EkGnHEI0YpQ0xr5zoMeQ=; b=hvqP7WRRzTuWZMambJ/kZHmaRbp+CVUHmGceXrEx2K/y24W3vII3QfO9 YVRIRzX7ZQBt+9qsODNnC3ILf/PMMLWItScsXai2dyx7wPLgL9tY4lRx0 mj9H4kBbtNJcFb7Bs+C5cgAhyCtXFobSRR4W2WKYTC0LSeahxroA09ian A=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: nqdIsawWsV0NUNXuRV64bM3LTdvfA9L0RIzmIdIoOqEOGYtyTZA6EwN8D2FBYlEU+YKF8FWKbY cq3QA3gqM/zSrIUyqA33VqMBolQQP+Iulo1hMcb3ykcLSny1uY8MZPPxXvIpA5+Ia4MThxzlxQ fY9Rq/1CiHKWEwA01k3cl0YTVR/XNNqBg8pINOs8OQITQm6NwEDJJa3lPepcTv0D4eBs/X+Yl4 9GOBEO9nIY5y5A9a/VnLbPIjiAv1vY0C/p5o2QuHxejyrLcJUvEDw2RQnSo88OftzcjfBiu6xv mqRWUMEobbocyrrlNG7J0+2w X-SBRS: 5.1 X-MesageID: 51166344 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:NtBFhanGO5sHbNIhcnlJy33Ntc/pDfOQimdD5ihNYBxZY6Wkfp +V8cjzhCWftN9OYhodcIi7Sc+9qXO1z/5ICPoqTM6ftWjdySCVxe5ZnO/fKlHbdREWldQtn5 uIEZIOb+EYZGIS5aqU3ODSKadC/DDzytHMuQ6o9QYOcegFUcBdxjY8LjzePlx9RQFAC5Z8Po Gb/NB7qz2pfmlSRtinB1EeNtKz6+HjpdbDW1orFhQn4A6BgXeD87jhCSWV2R8YTndm3aoiy2 7YiAb0j5/T/M1TiyWsmVM73a4m2OcJ+eEzR/BkTfJlaAkEvzzYJbiJnYfy+Qzd7tvfrGrC2+ O82yvId/4DkE85OFvF7CcFkjOQqgoG+jvsz0SVjmDkptG8TDUmC9BZjYYcaRfB7VE81esMpp 6j8ljpw6a/Nymw6xgVJuK4Ji1Chw6xuz4vgOQTh3tQXc8Xb6JQt5UW+AdQHI0bFCz35Yg7GK 02ZfusrMp+YBefdTTUr2NvyNujUjA6GQqHWFELvoiQ3yJNlH50wkMEzIgUn2sG9pg6V55Yjt 60e5hAhfVLVIsbfKh9DOAOTY++DXHMWwvFNCaILVHuBMg8SgfwQl7MkccIDcSRCeI1JbcJ6e j8uWJjxB0PkhjVeLCzNbVwg2/waXT4RjLw180b/IR9ttTHNcrWDRE= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51166344" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 11/51] build: move make option changes check earlier Date: Tue, 24 Aug 2021 11:49:58 +0100 Message-ID: <20210824105038.1257926-12-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802319356100003 Content-Type: text/plain; charset="utf-8" And thus avoiding checking for those variable over and over again. Also, add "e.g." in the error messages to hint that "menuconfig" isn't the only way. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v7: - Add "e.g." into the error message to hint that menuconfig isn't the only way. xen/Makefile | 22 ++++++++++++++++++++++ xen/Rules.mk | 22 ---------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index f35a4d84f7cd..2c56546cd1dc 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -56,6 +56,28 @@ include scripts/Kbuild.include ifneq ($(root-make-done),y) # section to run before calling Rules.mk, but only once. =20 +ifneq ($(origin crash_debug),undefined) +$(error "You must use e.g. 'make menuconfig' to enable/disable crash_debug= now.") +endif +ifeq ($(origin debug),command line) +$(warning "You must use e.g. 'make menuconfig' to enable/disable debug now= .") +endif +ifneq ($(origin frame_pointer),undefined) +$(error "You must use e.g. 'make menuconfig' to enable/disable frame_point= er now.") +endif +ifneq ($(origin kexec),undefined) +$(error "You must use e.g. 'make menuconfig' to enable/disable kexec now.") +endif +ifneq ($(origin lock_profile),undefined) +$(error "You must use e.g. 'make menuconfig' to enable/disable lock_profil= e now.") +endif +ifneq ($(origin perfc),undefined) +$(error "You must use e.g. 'make menuconfig' to enable/disable perfc now.") +endif +ifneq ($(origin verbose),undefined) +$(error "You must use e.g. 'make menuconfig' to enable/disable verbose now= .") +endif + # Beautify output # ------------------------------------------------------------------------= --- # diff --git a/xen/Rules.mk b/xen/Rules.mk index 48ae519d0153..c313486ce0f6 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -9,28 +9,6 @@ include $(XEN_ROOT)/Config.mk include $(BASEDIR)/scripts/Kbuild.include =20 =20 -ifneq ($(origin crash_debug),undefined) -$(error "You must use 'make menuconfig' to enable/disable crash_debug now.= ") -endif -ifeq ($(origin debug),command line) -$(warning "You must use 'make menuconfig' to enable/disable debug now.") -endif -ifneq ($(origin frame_pointer),undefined) -$(error "You must use 'make menuconfig' to enable/disable frame_pointer no= w.") -endif -ifneq ($(origin kexec),undefined) -$(error "You must use 'make menuconfig' to enable/disable kexec now.") -endif -ifneq ($(origin lock_profile),undefined) -$(error "You must use 'make menuconfig' to enable/disable lock_profile now= .") -endif -ifneq ($(origin perfc),undefined) -$(error "You must use 'make menuconfig' to enable/disable perfc now.") -endif -ifneq ($(origin verbose),undefined) -$(error "You must use 'make menuconfig' to enable/disable verbose now.") -endif - TARGET :=3D $(BASEDIR)/xen =20 # Note that link order matters! --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802909; cv=none; d=zohomail.com; s=zohoarc; b=asfBs6MixQ/mbpX7yyLbEC2bY+XXc0kftF6V3TdxZFfhPpFmpT8SZvMvt7KTMItjBapDNB8i6yi5Ivek3/dSpHrqZHTKmBLDfC8Rz+J9zTi0+d6jjCYcpfEWdOQmiAmdIPNQoQ8OBtBpxwtwkcMQUVLs4SxNCLkIT1g4rtg+Zjk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802909; 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=+OW9VZ6pX0Ynrm2kV706VKXurgQ2SkndC4ANU+Zr5J0=; b=dEp7H4+ZhOv4xYh7AeFUtj86oatAO3TY/9N+trs5GR12JJFvTCykOWFWuGgKJSwwCIG/lpg0c1Fgw4JZZjjdX7I50Yqt3wnxwt/Q0aji9y61rceV6D0xEh8UM7z/mnYuP7ClNfagpsFkDbZAv2PB9NFEsgVEDhS1rI3G6bhxcBI= 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 1629802909460674.3925836139567; Tue, 24 Aug 2021 04:01:49 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170975.312130 (Exim 4.92) (envelope-from ) id 1mIUBQ-0005Hh-HU; Tue, 24 Aug 2021 11:01:32 +0000 Received: by outflank-mailman (output) from mailman id 170975.312130; Tue, 24 Aug 2021 11:01:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUBQ-0005GM-1C; Tue, 24 Aug 2021 11:01:32 +0000 Received: by outflank-mailman (input) for mailman id 170975; Tue, 24 Aug 2021 11:01:30 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1x-0001EC-9V for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:45 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c425c8f3-66b6-4f5d-a715-381d512cfa24; Tue, 24 Aug 2021 10:51:08 +0000 (UTC) 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: c425c8f3-66b6-4f5d-a715-381d512cfa24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802268; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fDJGU3FkNLcK/b6b+O2MvcAjqOVoHCERsz8l937Wo3Y=; b=gJQ4E4xqPbpeCd7bVUdlEJhMg04N7JjFdlJ4qFKlV65jMEzbSyQTqq8x fh94BXFUPb6dSfZF/D2AQVsKD1ZGlz+lZVT0yzUtTpqSmb2NFjTv89E17 pGzG24Y3wJ4DGH8ws1gC7Dv91s62UB+TWxxk9KMjzirc7zVkPAjIoJ5us A=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: o4GYAJKiEqeohc1zWN8L7hnKNGzoj4T0925gua+IWeEGOBw84hGr/N0oyoyJl4AcSpqfCMDPz7 uNyDoe2/qcD5QBn6HQerPN0woY9bdV5/PfeAtHa4JzPfJOYHHexfhFLtq4zE1QrhmUxjdjuVQS y/rWCh7DsW5iw2VkBoVqZQ53V+8ZdODIzx96bGtZwmjN6qN8QYTB9TGz4MWQ910vXQKVA8eZ6I py5Q3VAb8dMUv6CklQvdmyEw8W/0mvZQBRsp1DLjek45MIbBRMnpp5i9eSxi9IebtGjF5h1608 ah9uH3+7EKOk6+iZk0qgswAP X-SBRS: 5.1 X-MesageID: 51130726 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:SfC356yGMaLhi5qMcGgXKrPxnuskLtp133Aq2lEZdPULSKGlfp GV9sjziyWetN9IYgBapTiBUJPwIk80hqQFm7X5XI3SEDUO3VHFEGgM1/qE/9SNIUzDH6tmpN 9dmstFeZLN5DpB/KDHCWCDer5OruVvsprY/Ns2pE0dLz2CHpsQizuRfTzrd3GeKjMnObMJUL 6nouZXrTupfnoaKu6hAGMeYuTFr9rX0Lr7fB8vHXccmUizpALtzIS/PwmT3x8YXT8K66wl63 L5nwvw4bjmm+2nyyXby3TY4/1t6ZvcI5p4dY+xY/ouW3DRYzWTFcBcsnq5zXcISdSUmRQXeR /30lEd1opImirslyqO0GbQMkHboUoTAjnZuBGlaDLY0LPEbSN/BMxbiY1DdBzFr0ImodFnya pOm3mUrpxNEHr77WzADnfzJmJXf2eP0AwfeNQo/jViuEolGc1shJ1a+FkQHIYLHSr85oxiGO 5yDNvE7PITdV+BdXjWsmRm3dTpBx0Ib127a1lHvtbQ3yldnXh/wUddzMsDnm0Y/JZ4T5Vf/e zLPqlhibkLRM4LaqB2AvsHXKKMeyfwaAOJNHjXLUXsFakBNX6Io5nr4K8t7OXvY5AMxItaou W3bLqZjx9HR6vKM7zC4HRmyGG9fIyNZ0WZ9igF3ekGhlTVfsuaDRG+ X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51130726" From: Anthony PERARD To: CC: Anthony PERARD , Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [XEN PATCH v7 12/51] build: avoid building arm/arm/*/head.o twice Date: Tue, 24 Aug 2021 11:49:59 +0100 Message-ID: <20210824105038.1257926-13-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802916333100002 Content-Type: text/plain; charset="utf-8" head.o is been built twice, once because it is in $(ALL_OBJS) and a second time because it is in $(extra-y) and thus it is rebuilt when building "arch/arm/built_in.o". Fix this by adding a dependency of "head.o" on the directory "arch/arm/". Also, we should avoid building object that are in subdirectories, so move the declaration in there. This doesn't change anything as "arch/arm/built_in.o" depends on "arch/arm/$subarch/built_in.o" which depends on $(extra-y), so we still need to depend on "arch/arm/built_in.o". Signed-off-by: Anthony PERARD Acked-by: Julien Grall --- xen/arch/arm/Makefile | 7 ++++++- xen/arch/arm/arm32/Makefile | 1 + xen/arch/arm/arm64/Makefile | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 3d0af8ebc93c..cc90d9796e6e 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -64,7 +64,6 @@ obj-$(CONFIG_SBSA_VUART_CONSOLE) +=3D vpl011.o obj-y +=3D vsmc.o obj-y +=3D vpsci.o obj-y +=3D vuart.o -extra-y +=3D $(TARGET_SUBARCH)/head.o =20 extra-y +=3D xen.lds =20 @@ -76,6 +75,12 @@ endif =20 ALL_OBJS :=3D $(TARGET_SUBARCH)/head.o $(ALL_OBJS) =20 +# 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 diff --git a/xen/arch/arm/arm32/Makefile b/xen/arch/arm/arm32/Makefile index 96105d238307..3040eabce3ad 100644 --- a/xen/arch/arm/arm32/Makefile +++ b/xen/arch/arm/arm32/Makefile @@ -11,3 +11,4 @@ obj-y +=3D smpboot.o obj-y +=3D traps.o obj-y +=3D vfp.o =20 +extra-y +=3D head.o diff --git a/xen/arch/arm/arm64/Makefile b/xen/arch/arm/arm64/Makefile index 40642ff57494..0bb284dedab2 100644 --- a/xen/arch/arm/arm64/Makefile +++ b/xen/arch/arm/arm64/Makefile @@ -13,3 +13,5 @@ obj-y +=3D smpboot.o obj-y +=3D traps.o obj-y +=3D vfp.o obj-y +=3D vsysreg.o + +extra-y +=3D head.o --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802886; cv=none; d=zohomail.com; s=zohoarc; b=HRPO138/R46RVSBosfsvNvqpYRM4IawBox4yVWLYuI1ctmwyjyBFt0c+BaMcP8FCIT3Ha/U/84FZNtFWqYTGUBtPPQMGvNChb/Ay+Fda1UJcahOxJGY4l2sJOnswQ4UBhU8gdhzRMzA3nF5bIzS6Uw4KxHmweZYIyuA2Lhi4Y0k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802886; 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=kWIaXuKpGRPJat/N61bHexsQ5s3wUrDXIA4MNaqOg24=; b=WW4AHUOo07rJ6KaGQ3K7Hi05zvQNLMc3eHg97fmAEpa+R4Mmq6qNP1soQLxfqXHP2g6cO/yRUqmiHCgIfwXRz5uht94fP102XDkYfxtzftruFHMibe+uvpg6+85aWy0iq/9n6NQx7KuQRLorAq9zu4mFOD1gfnZHdXp4CR8vUaw= 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 1629802886422791.5855011813899; Tue, 24 Aug 2021 04:01:26 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170957.312053 (Exim 4.92) (envelope-from ) id 1mIUAx-0002gH-RQ; Tue, 24 Aug 2021 11:01:03 +0000 Received: by outflank-mailman (output) from mailman id 170957.312053; Tue, 24 Aug 2021 11:01:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUAx-0002gA-OB; Tue, 24 Aug 2021 11:01:03 +0000 Received: by outflank-mailman (input) for mailman id 170957; Tue, 24 Aug 2021 11:01:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU22-0001EC-9b for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:50 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3bd6516f-f5e4-492b-9635-845939c011e7; Tue, 24 Aug 2021 10:51:10 +0000 (UTC) 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: 3bd6516f-f5e4-492b-9635-845939c011e7 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802269; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WypzVU9rf23sGm2Av46eWBR2S9nY0Xuo8OA2HzrRil0=; b=AAUTZgulXbDcDEFnl7sWjm8ot5/+lNi6z4Z3Yl1HWvzcTWym4JBEjbBV AWaEgPJ1tq1WwJKOVcvdST6iYUDO8+18H6/Mg2mWraQfADfTFG5Uu/ARj AWX4WajI+SXUw7faracDBxn8sYD1dnd2b6pTU3A955Uh6YRFPR/iAMszJ A=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: V5zkhaFj1GJEZ9xLAqK6GdzDCUgaGdMHnS8SzdSXpa8yMjZncY8XGpF+D4eYZRL1gZ9CwaJRof H1UWmZOa221YArykhQGZPUzSgZAGHr1ZuBM2hnnxe2yj1kG694XykysdPrwQ4gmz8RC7kImmbP +KwgegsLA1Fi8GD+p2nX7pgeSBmdXYap3Y+LwD+nTcVjpk6XMVzCSMfT2vfc5SxEmelyBXkvcZ SDQWNcApf8ecc4rk+0lp4he5s+7Db0/kiXf22NPBA1gtIESleU/AitiZN2R0QuYvmp3I4hmTtZ nfTnSDA3/F1KE1NCpVVGbXKh X-SBRS: 5.1 X-MesageID: 51153535 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:fCnLzqFyzFcUXqC5pLqEEseALOsnbusQ8zAXPiBKJCC9vPb5qy nOpoV+6faQslwssR4b9uxoVJPvfZq+z+8R3WByB8bAYOCOggLBQL2KhbGI/9SKIVydygcy78 Zdm6gVMqyMMbB55/yKnDVRxbwbsaa6GKPDv5ah8590JzsaDJ2Jd21Ce32m+ksdfnghObMJUK Cyy+BgvDSadXEefq2AdwM4t7iqnayzqHr+CyR2fyIa1A== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51153535" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v7 13/51] build: convert binfile use to if_changed Date: Tue, 24 Aug 2021 11:50:00 +0100 Message-ID: <20210824105038.1257926-14-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802897810100001 Content-Type: text/plain; charset="utf-8" This will allow to detect command line changes and allow to regenerate the file in that case. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v7: - define $(cmd_binfile) in Rules.mk so we can use the same one in both common/ and xsm/flask/ xen/Rules.mk | 5 +++++ xen/common/Makefile | 5 +++-- xen/xsm/flask/Makefile | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index c313486ce0f6..f449669475bd 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -57,6 +57,11 @@ cmd_ar =3D rm -f $@; $(AR) cr $@ $(real-prereqs) quiet_cmd_objcopy =3D OBJCOPY $@ cmd_objcopy =3D $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ =20 +# 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) + define gendep ifneq ($(1),$(subst /,:,$(1))) DEPS +=3D $(dir $(1)).$(notdir $(1)).d diff --git a/xen/common/Makefile b/xen/common/Makefile index 54de70d42278..141d7d40d3dc 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -80,8 +80,9 @@ config.gz: $(CONF_FILE) =20 config_data.o: config.gz =20 -config_data.S: $(BASEDIR)/tools/binfile - $(SHELL) $(BASEDIR)/tools/binfile $@ config.gz xen_config_data +config_data.S: $(BASEDIR)/tools/binfile FORCE + $(call if_changed,binfile,config.gz xen_config_data) +targets +=3D config_data.S =20 clean:: rm -f config_data.S config.gz 2>/dev/null diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 637159ad8276..f4d4038c01bd 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -35,8 +35,10 @@ $(subst include/,%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mka= ccess) FORCE obj-bin-$(CONFIG_XSM_FLASK_POLICY) +=3D flask-policy.o flask-policy.o: policy.bin =20 -flask-policy.S: $(BASEDIR)/tools/binfile - $(SHELL) $(BASEDIR)/tools/binfile -i $@ policy.bin xsm_flask_init_policy +flask-policy.S: BINFILE_FLAGS :=3D -i +flask-policy.S: $(BASEDIR)/tools/binfile FORCE + $(call if_changed,binfile,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 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802316; cv=none; d=zohomail.com; s=zohoarc; b=W3/drV+M53XLV7jD35dJen78IaumOHyqaZG+CXZka1Be33nimDRb6g3EQA5OSSbg5kZacn2TTPlkokBbfye2zHRqo6pdTEGU45K+dmDwi6Qx3TcfbaAsIDqeny5ArTFawwz0KeyQ4rcJyvfSpuq+EXXdgQjJMHLQMAFKh2WCOoQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802316; 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=lbzlYPzTPn5vImBpZQszqA4pbCcq21/WeGrbXkb0gj8=; b=M8mHx8mz/APLne0ZBqEv2QNjUtGZTVK9p6tsCdKeC4pap5pDwKBJnC7Qbud0dFYxAdgxwaYu+9LkpqRqVbgCLWdNkvhpICrLQFsfZcr39uIQS0WlXMfuOvXelIhGq0VvZfGEX6Wyv/JAXJpvTM8OFYsC/Eyzuo1E8JsLjgroVGc= 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 1629802316719500.24390838288593; Tue, 24 Aug 2021 03:51:56 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170919.312003 (Exim 4.92) (envelope-from ) id 1mIU1k-0005hF-Hf; Tue, 24 Aug 2021 10:51:32 +0000 Received: by outflank-mailman (output) from mailman id 170919.312003; Tue, 24 Aug 2021 10:51:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1k-0005g8-9L; Tue, 24 Aug 2021 10:51:32 +0000 Received: by outflank-mailman (input) for mailman id 170919; Tue, 24 Aug 2021 10:51:30 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1i-0003Ux-8z for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:30 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 35d853ee-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:51:18 +0000 (UTC) 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: 35d853ee-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802278; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=i6szS8ayYQoVvg/oA88HgBsvGa9IldJQspmK9pVPvts=; b=erQiNVSXtyZF4J1OmXZM7/OzFqc6lc6aVJdh5+LkE3Z6UKuEs4sONMin YpURes45k0XeqJkON0QlP4nkywFZxZNjLm6+ecXTKdMpXJ6WxOtTSD/hy 7EIJiOeziG4KgWMHfGD85Mi3I2RMfzjmUzRSVVBbFCVTGHFXxcE2Jaon+ w=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: jhr0/K6Z4LJCBX+sK7qYHq7SYKKuTT4l3phw+LrYqg6SuzoA0utMVn2SSkcFavfK1SDj4RCpK9 oDhNwWsTiD20SAFsY9H3OS101k8u6gUm9vOeLUcRIPfpnzzO+7fgGYBfSw2MKUKCn6oarv6WX9 W1psEpAl7CWjSFnfV/WWgRT93Zc8QfpB4Hj8J7KVZsCooveYx5QbBL1qqf65RL7uZKDfg7y00N 2k54f3mq6xvsG1A9UgmZYPJJEBvWNGI2/MLUUoVi22jSXOPZhylSlglRDIT555kEwriIHUx9d3 /uaHBRwn+8binQA4oYMyjgN4 X-SBRS: 5.1 X-MesageID: 51153544 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:MlyUjaEqr6vLRWnLpLqE0MeALOsnbusQ8zAXP0AYc3Jom6uj5q aTdZUgpGfJYVkqOE3I9ertBEDEewK4yXcX2/h3AV7BZniEhILAFugLhuGO/9SjIVybygc079 YYT0EUMrzN5DZB4voSmDPIceod/A== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51153544" 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 , 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 v7 14/51] xen: move include/asm-* to arch/*/include/asm Date: Tue, 24 Aug 2021 11:50:01 +0100 Message-ID: <20210824105038.1257926-15-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-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: 1629802317515100001 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 --- Notes: 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/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/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 +- 330 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/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/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 8ebb51b6c5e8..bc964663d25c 100644 --- a/.gitignore +++ b/.gitignore @@ -315,6 +315,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 @@ -322,13 +323,11 @@ 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/asm-offsets.s 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 56d16e4328cf..d7041c3cc698 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -245,7 +245,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 @@ -291,10 +290,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 @@ -320,8 +319,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 @@ -332,10 +331,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 @@ -411,10 +410,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..6668756ceb63 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/asm 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 2c56546cd1dc..da1b8ddb97ff 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -164,7 +164,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 @@ -367,7 +367,7 @@ _clean: delete-unfresh-files find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \ -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 =20 .PHONY: _distclean @@ -381,7 +381,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/; \ @@ -389,7 +388,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. @@ -435,7 +434,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."; \ @@ -453,8 +452,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/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 a1ee3146efeb..ed7b4bd26eea 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 929227f5a3ac..5e1d38d6cd5b 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -274,11 +274,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 @@ -305,7 +305,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/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 375b94229e13..38d6caf2a430 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 958ba0cd9256..f3eeab132e08 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -241,7 +241,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 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 Sun May 5 07:12:38 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=1629802303; cv=none; d=zohomail.com; s=zohoarc; b=FDdHQzW1s8Pxk4/HxYvwgOdwpRuKB/6046NjNXsnNRTSTx4pAFk2EsMDPI2j8NyLYQzysj4Kt3vhy5MVcWFIH2/xc52mJ0d5l0wr7LG5Oq9wWEekUi37ahVyElKhCXN8QWauT7Su+24vmQKhcG3f6EiV/CJlrdHAfssaremxfkE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802303; 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=5V45TownO6/bXt6HudQcn2syGoMEj+HQLMcktqRwe/Y=; b=Htv5jpBMRGc+y3YjP1Cc4phK2jFUJ3k3mRnFWHn7PddqPUafOxRtaKeKfZ9hc7xlar0XK/740Sg6Vy3sa9rmrLwr9qdV8SOCjUmIiZdhnQeVQvyqB42PZVz9y7c6Y7slg2LjirXo8qwOvoK5+Ub5DRH9kqUPejGuvLbsg+BYHA8= 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 1629802303072336.95262459695994; Tue, 24 Aug 2021 03:51:43 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170914.311982 (Exim 4.92) (envelope-from ) id 1mIU1f-0004qK-RQ; Tue, 24 Aug 2021 10:51:27 +0000 Received: by outflank-mailman (output) from mailman id 170914.311982; Tue, 24 Aug 2021 10:51:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1f-0004pB-HS; Tue, 24 Aug 2021 10:51:27 +0000 Received: by outflank-mailman (input) for mailman id 170914; Tue, 24 Aug 2021 10:51:25 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU1d-0003Ux-94 for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:51:25 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 361a20b0-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:51:19 +0000 (UTC) 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: 361a20b0-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802279; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0CY45XrUU2T0e2Vp/z8jyA8usgILrp2Rsr6xmzfEv6A=; b=ISha4QLBoO6lqYEdFy/7A1FwCzbsZNizvFbITpTSYi7kgNcTsZMMkrqP vfWn6e8PSuVG4LAzfK0UC0hxaq5Oly6XwoQW7GBczWIfAB5z4zFMfJtLQ bKp8w0Ue/QvH4f8LDmbCM3YrKi3SCpk7ClG/IaSbJqEO0gD9Te391eQws o=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: pFsjp1tOBwai6Z9SHPUnMOK5s8wm+7L0DeAix7HOrAEf3eT6O2aP/owMMthgNeJck/78FqlKFe gRGdIYMUwWkltEOzKojqr6pnkJ289wF2pBMA6e4riD9CX7uWk805bHRXgfQ5mPnnjIUqRKeCC/ 2vNmkm77MYWqtC/+qGreKYF30T9FzNxfiC8Uq/Bgsd0ERzLY0FEZS5asbV3OrXhnyKthCVS2yo fiqEUUMyuLuaiVocNa6aQH1rGxtbx4rV4yG5sB5KKBjPnFGsaYFZAQRXiGh9VL+kmqxr0u04VC 8IW0SzcFw739QEqgoBC5TS6A X-SBRS: 5.1 X-MesageID: 51130735 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:EVYY16nwshRySrV/UBoem+BoE8vpDfOeimdD5ihNYBxZY6Wkfp +V8cjzhCWftN9OYhodcIi7SdK9qXO1z+8X3WBjB8bZYOCGghrlEGgG1+ffKlLbakrDH4JmtJ uINpIOcOEYbmIKwvoSgjPIderIqePvmM/HuQ6d9QYVcegAUdAD0+4NMHf+LqQAfngiOXNWLv qhz/sCgwDlVWUcb8y9CHVAdfPEvcf3mJXvZgNDLwI76SGV5AnYqYLSIly95FMzQjlPybAt/S zuiAri/JiutPm911v1y3LT1ZJLg9Hso+EzRPBky/JlaQkEuDzYIbiJaIfy+AzdZ9vfr2rCpe O84SvI+f4DrU85MFvF+CcFkDOQrQrGo0WStWNwx0GT7/ARDQhKdPZplMZXdADU5FEnu8w52K VX33iBv54SFh/Ymj/hjuK4Hy2COXDE0kbKvNRj+UC3a7FuIYO5bLZvjn99AdMFBmb3+YonGO 5hAIXV4+tXa0qTazTcsnN0yNKhU3wvFlPeK3Jy8PC9wnxThjR03kEYzMsQkjMJ8488UYBN46 DBPr5znL9DQ8cKZeZ2BfsHQ8GwFmvRKCi8e166MBDiDuUKKnjNo5n47PE84/yrYoUByN8olJ HIQDpjxBkPkoLVeLmzNbhwg13wqUmGLEXQI/Bllu1EU+fHNcTW2AW4OSATr/c= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51130735" From: Anthony PERARD To: CC: Anthony PERARD , Bob Eshleman , Alistair Francis , Connor Davis Subject: [XEN PATCH v7 15/51] build,riscv: tell the build system about riscv64/head.S Date: Tue, 24 Aug 2021 11:50:02 +0100 Message-ID: <20210824105038.1257926-16-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802304236100001 Content-Type: text/plain; charset="utf-8" This allows to `make arch/riscv/riscv64/head.o`. Example of rune on a fresh copy of the repository: make XEN_TARGET_ARCH=3Driscv64 CROSS_COMPILE=3Driscv64-linux-gnu- KBUIL= D_DEFCONFIG=3Dtiny64_defconfig arch/riscv/riscv64/head.o Signed-off-by: Anthony PERARD Acked-by: Bob Eshleman Reviewed-by: Alistair Francis Acked-by: Connor Davis --- xen/arch/riscv/riscv64/Makefile | 1 + 1 file changed, 1 insertion(+) create mode 100644 xen/arch/riscv/riscv64/Makefile diff --git a/xen/arch/riscv/riscv64/Makefile b/xen/arch/riscv/riscv64/Makef= ile new file mode 100644 index 000000000000..15a4a65f6615 --- /dev/null +++ b/xen/arch/riscv/riscv64/Makefile @@ -0,0 +1 @@ +extra-y +=3D head.o --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802953; cv=none; d=zohomail.com; s=zohoarc; b=aOsCBRc+iRI1WAWOzZbHimG53SQ4oDmj07lXP7oQV6U4zpGD0bLck42c7p86cMCKTYvvEk9w6p0E6uGklgzNSXa4WmHEJSui0LSky2BuveplaN5zCnQs5Pw6eAKgw0m8VScIQl77EyrfvFL4lQMyi2xVT7aasA8TOQM+DDL/MXc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802953; 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=b5B8HHlJBUGfZwRXqPgJNjWoBSya1dgTQQqhp/kgemo=; b=Y6Ikxc8+lpn2su0aib7ovryseBsqgVC1OaxnRlN/N//aaDJihxHCGLGCebWE55+V6X+LC/zALl1HgxKff+dg4djWcwaYN+ApxErxT4u+PNKPDxNF4DO0zy6f12MsUi90jgm6ejtuBDOuvY+lijRTTv/pjWp/DHpt5n94Cbe7Ydc= 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 1629802953131166.08365968681017; Tue, 24 Aug 2021 04:02:33 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171056.312328 (Exim 4.92) (envelope-from ) id 1mIUC6-0006dY-SH; Tue, 24 Aug 2021 11:02:14 +0000 Received: by outflank-mailman (output) from mailman id 171056.312328; Tue, 24 Aug 2021 11:02:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUC6-0006Zh-C8; Tue, 24 Aug 2021 11:02:14 +0000 Received: by outflank-mailman (input) for mailman id 171056; Tue, 24 Aug 2021 11:02:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2M-0001EC-AW for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:10 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id be739491-6fcf-47d3-924a-58cc87201d46; Tue, 24 Aug 2021 10:51:20 +0000 (UTC) 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: be739491-6fcf-47d3-924a-58cc87201d46 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802280; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4K2WW2uFAO71Mw1Ci7VJHE6S1kjO2hGHCWlQ2ukScjo=; b=J4+2uQcfeNnESq08hNFzKzc9bNcencyAOCxfIsX1f1am37l1iZuwzqYI pB+7HDAl7vqCdCPB3v7gndIwe19psAJ11FHO7jCZHvop6wAmtZ2zRtVwW yKj13FCCvGH8asyMqyip3hwjOErg4PCzcnhy9Nu5krmnbaW0F5tmCvkUT 8=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: BECysvkXl+SLk8oroUW9xH1BtvgHaX6XgzpAPVRXqScfK3SmFuUXzOvEh6lVKYxFJx33tY3Lr4 YKv6mcxpS5X9hPlkLTqzOHUKZTT5jmJVkVY8RLzP3jIumyBcOnYxwh4BBk6Zu03KitEislh6zD 0n37lx45qoyQ4/oDOIAqSCGqF0IOAf4S/3k8b7Vw9ca7KR/Z0EzPt6trrndppci/OXCZOlCNEO Mpau9Nl+dPaTtOpYemAeUtF+xsmlNPrFTjm582FCYshN2W2p38rPxizgw1kuRPCWa/xTyJJscC G8oWNjC521hlbYsfSTPpjnxj X-SBRS: 5.1 X-MesageID: 50772186 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:MlMACa+0nqzPz1J3W4luk+AiI+orL9Y04lQ7vn2ZKSY5TiVXra CTdZUgpHvJYVMqMk3I9uruBEDtex3hHP1OkOws1NWZLWrbUQKTRekP0WKL+Vbd8kbFh4xgPM lbEpSXCLfLfCVHZcSR2njFLz73quP3j5xBho3lvglQpRkBUdAG0+/gYDzraXGfQmN9dPwEPa vZ3OVrjRy6d08aa8yqb0N1JdQq97Xw5evbiQdtPW9e1DWz X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="50772186" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 16/51] build: generate "include/xen/compile.h" with if_changed Date: Tue, 24 Aug 2021 11:50:03 +0100 Message-ID: <20210824105038.1257926-17-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802954827100002 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 --- Notes: 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. .gitignore | 1 - xen/Makefile | 34 +++++++++++++++++----------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index bc964663d25c..59a22d1685e2 100644 --- a/.gitignore +++ b/.gitignore @@ -332,7 +332,6 @@ xen/include/compat/* xen/include/config/ xen/include/generated/ xen/include/public/public -xen/include/xen/*.new xen/include/xen/acm_policy.h xen/include/xen/compile.h xen/include/xen/lib/x86/cpuid-autogen.h diff --git a/xen/Makefile b/xen/Makefile index da1b8ddb97ff..b408d35b4af0 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -351,7 +351,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 @@ -368,7 +368,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 + rm -f .banner include/xen/compile.h =20 .PHONY: _distclean _distclean: clean @@ -378,7 +378,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])= ; \ @@ -391,14 +391,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 \ @@ -413,9 +405,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' \ @@ -425,10 +419,16 @@ 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 Sun May 5 07:12:38 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=1629802911; cv=none; d=zohomail.com; s=zohoarc; b=bAlIv2JsuJP/PtiA/mAGgxd/hxgONr2c1c3k+h4OiXxTmzHb3YUYVAmvcoHSnUZMuJEFSe8tDc5n2HqdtmcvdqhWWCgAPX912PVPz3QBCtxY6Z8b4BEJ9gQc7I9+GPu8OCidi7FNGsU2UDtF7RM4BcW1D5hnYFsnjSJ0mMch7X8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802911; 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=God3991M9ovjfCDkZezH6su16chuGJ+ukcZV2AXM+mY=; b=hmO9Oea1stg0pW9J6oYM0q6qQMfZWhlJ5EuLtygg3euFOPLysENmnCh05nxpVXCdkrGwrYKPqnTq5sGgIrdjk/oQzKFF/w0UqAtluec7OK/b1RD9XtMYBJq4lEnMobADIOFBdCYySRpMSTUJnrkcUECfcQ3mgdS21/gkD88u6nU= 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 1629802911718893.1835980360892; Tue, 24 Aug 2021 04:01:51 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170974.312122 (Exim 4.92) (envelope-from ) id 1mIUBP-000587-Mc; Tue, 24 Aug 2021 11:01:31 +0000 Received: by outflank-mailman (output) from mailman id 170974.312122; Tue, 24 Aug 2021 11:01: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 1mIUBP-00057G-Ez; Tue, 24 Aug 2021 11:01:31 +0000 Received: by outflank-mailman (input) for mailman id 170974; Tue, 24 Aug 2021 11:01:30 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2R-0001EC-Ah for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:15 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fdf2d3ba-4e2a-49c7-b534-17960bb9caa3; Tue, 24 Aug 2021 10:51:22 +0000 (UTC) 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: fdf2d3ba-4e2a-49c7-b534-17960bb9caa3 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802282; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=R0ELoo+7nNz0sid1BROwVq9XSwu7Jmvu/Gqb1wk09qU=; b=gzxVU9cridmz+ubVLYa7jwbY2CJzK/hlHcqJCOICUXX1qb619b4zYvmg H9pV8hFcK8tU0BKtBy+DspbWpt20tnPZeaE3bdqsDTI5NA1erQAmJ7N09 Ftzalq2kFOPYnH6f4SC46LaU0e1/zzfLzBi9jo6mxgwxn82JLDeG8U37H M=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: PQ3LFFBQZQNFDhB5zYo3jISxm/h2RT0bxuS357LbZxPJrtZRLBAvvwrTdHwO7tqjdA6HubXp/Q RwT9WMvDo6hFcsV0GZFOoqmjTosx3Mjl/I9l5IRYCdueIqL3s4DMAXSIUNydxNWvKOmt7BGDAn L6ZAPOi8Lz7xm0i2b3PVLf6ms+pMp2umBYrZ3AwL9zVNwWp4RTybSN0ivCbs5xEnHSvXNnAEx0 PhSZXQrnQc9SHtw6k4Zkvh1cnCGvlGtAWvnF8v1vJ78OaAL1LRv0vZ2GNap1haVuMMrjBDmFe8 ePnF4ypTCJhm4jS0IQrDqNUN X-SBRS: 5.1 X-MesageID: 51153557 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:gy42IKGGoyHBd1HspLqFWpHXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskdrZJkh8erwW5VoMkmsj6KdgLNhcYtKOTOLhILGFvAE0WKP+Vzd8mjFh5ZgPM RbAudD4b/LfD5HZK/BiWHWferIguP3iZxA7t2urUuFODsaD52ImD0JbzpzfHcXeCB2Qb4CUL aM7MtOoDStPV4NaN6gO3UDV+/f4/XWiZPPe3c9dl8awTjLqQntxK/xEhCe0BtbeShI260e/W /MlBG8zrm/ssu81gTX2wbontRrcZrau5h+7f63+40owwbX+0KVjUNaKvq/VQUO0aOSAZAR4Z /xSlkbTp1OAjjqDxyISFPWqnXdOXAVmjHfIBaj8ATeiN28SzQgB8Vbg4VFNhPf9ko7pdl5lL lGxmSDqvNsfFv9dYvGlqv1vjxR5zyJSEAZ4KcuZr1kIPkjQa4UqZZa8FJeEZ8GEi6/4Ic7EP N2BMWZ4PpNa1uVY33Qo2EqmbWXLz4ONwbDRlJHtt2e0jBQknw8x0wExNYHlnNF8J4mUZFL6+ nNL6wtnrBTSc0da757GY46MICKI32IRQiJPHOZIFzhGq1CM3XRq4Tv6LFw/+2ucIxg9upEpH 0AaiItiYcWQTOiNSSj5uw7zvn9ehTJYd228LAh23FQgMyNeIbW X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51153557" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v7 17/51] build: set XEN_BUILD_EFI earlier Date: Tue, 24 Aug 2021 11:50:04 +0100 Message-ID: <20210824105038.1257926-18-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802918604100007 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-check-relocs) as the former might be a bit too generic. Signed-off-by: Anthony PERARD --- Notes: 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 | 36 ++---------------------------------- xen/arch/x86/arch.mk | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 34 deletions(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 5e1d38d6cd5b..dfcbd01bb4ed 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -123,41 +123,7 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 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 - -# 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) =20 ALL_OBJS :=3D $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/= built_in.o $(ALL_OBJS) @@ -218,8 +184,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..98dd41d32118 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-check-relocs :=3D $(shell $(OBJDUMP) -p $(efi-check-o:.o=3D.efi) | gre= p '^[[:blank:]]*reloc[[:blank:]]*[0-9][[:blank:]].*DIR64$$' | wc -l) + +ifeq ($(efi-check-relocs),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-check-relocs),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 Sun May 5 07:12:38 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=1629802887; cv=none; d=zohomail.com; s=zohoarc; b=fIZS8lvLR6ISQ+WVbW/0idlJhFEYI8pt11+3RXcKZB/cgDOP0m+wHaBcvuPYqeKrL8tbvIWrto8pO/cqBBq1tHg6hE+qEnT2q6zD0BWZVjXZiBzQDE9gfN8RrGqWP0SeUvxhBkXKc0xN4mNKXSB4eU6RscyqPfldBkA1gxFcwBg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802887; 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=2S/Cru9zkv/kgevB7+Dmay6R8+mJyUlBEXU/4wzqtfA=; b=e4dafW44lXCKxq3NtU0ZmmEpVlIFzQQGBE1G7XiOQuPL53Jb7Fnl/Ga9oeDRCFIjO2SgOQGeH8QEKNQea+FXeZHHbEnEQ3jpqX0/Q8dFx6Rr5kAllNl+Zm5ssGJ3qzBIqMgVBLpL4h9uPqNMSVq9yswqFwXlFwHHcVDTegDj7Qk= 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 1629802887772323.62854076632686; Tue, 24 Aug 2021 04:01:27 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170959.312057 (Exim 4.92) (envelope-from ) id 1mIUAy-0002j7-4C; Tue, 24 Aug 2021 11:01:04 +0000 Received: by outflank-mailman (output) from mailman id 170959.312057; Tue, 24 Aug 2021 11:01:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUAy-0002i9-08; Tue, 24 Aug 2021 11:01:04 +0000 Received: by outflank-mailman (input) for mailman id 170959; Tue, 24 Aug 2021 11:01:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2W-0001EC-Aq for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:20 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 930ad33d-b515-4fe2-b6d7-25f038806064; Tue, 24 Aug 2021 10:51:23 +0000 (UTC) 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: 930ad33d-b515-4fe2-b6d7-25f038806064 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802283; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FW24mf7gQhBpHHcg9GJm9hyluG+ERn9X5WYN2UmMbPk=; b=Z8r2AQdRi+/NjWbISrBzb8qehjOIyKDNS9p5iaj8V6DqJuOC0jRxm75g oNnbyo5uAXyLbBOKGUvUSy3E7tImlzPtpGN0aque1S2kKf6soeSVhwLzU Cl/CermTQzEzMY/UA5q9kzKjXrZOxyxFX5sVH2tqrgUIYTfB9qmjHw/vO A=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: x5Me5gMX8yanwNrzDTYwNTAHf2ybo9F+pMvILih7HdtcE7pw9zqLMUWBWkPRp+4fXIYG5AGyht QM8xPEpFuqJAEd6MFcfXfodn9F14gtJh/WkpAz6qOmYDc4jOkd3Kj72eEM6FvSKEosX0UlpJAj jnm03gXfEIVmGqQfUOh7To5T9SJFBOhVnJyRzD8v7M/Oc7RHR353I7WmX/6vHhMCQ6zt8EX3SC T3R/DUcIftFHPMZVSO2D+R2qMZy6n+Q+W3a7nTj+YCdlkDwPK+E/hLkW/pkIGWpX3z46JC9BH+ nXq20fkEqjRTWEmSqKWHzMur X-SBRS: 5.1 X-MesageID: 52875464 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:R4R896rLEWB0taI4l5WiHM0aV5oTeYIsimQD101hICG8cqSj+f xG+85rsyMc6QxhIE3I9urhBEDtex/hHNtOkOws1NSZLW7bUQmTXeJfBOLZqlWKcUDDH6xmpM NdmsBFeaTN5DNB7PoSjjPWLz9Z+qjkzJyV X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="52875464" From: Anthony PERARD To: CC: Anthony PERARD , Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [XEN PATCH v7 18/51] build: fix $(TARGET).efi creation in arch/arm Date: Tue, 24 Aug 2021 11:50:05 +0100 Message-ID: <20210824105038.1257926-19-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802898509100005 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 --- 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 cc90d9796e6e..dc1d09c8b429 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -93,7 +93,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 Sun May 5 07:12:38 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=1629802953; cv=none; d=zohomail.com; s=zohoarc; b=a48Q0IQ8TQkpP2xSGj7Qb+fU5AtEPp1dofQABDwWmdeJ1srjowGuWdTvtJuLYdC3WyGd4Jn1xrTlp5AgO4cT//cfiJqUtllxhAxV6kXcPz2iIknOzXd3o66fTxHStnDuFqo4+UmzhPYKXULdw9+eiYxUb1IsJZxKTHYLiLXr4Bg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802953; 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=VrRssODTXkFMYvyIhvVyQ/e84gQUSSpFv6knIsuqpAg=; b=NwXviknKxpVyCZygCIW1LGhgJl/fSYglRt3t2j79IpRdyU5sku5C8QDupk6oV13tUDYk8W1XTJKCqLhLAZRwb5YtEN8e56j52sjTpFl9eGpCzY5p5SRR2BLGQZAT8iTRDQ8CeLq+b9n1eV1rxYEqfIE0aGhNbdGbH9DAwSjkB54= 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 1629802953279283.18797314036567; Tue, 24 Aug 2021 04:02:33 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171051.312321 (Exim 4.92) (envelope-from ) id 1mIUC5-0006UQ-SY; Tue, 24 Aug 2021 11:02:13 +0000 Received: by outflank-mailman (output) from mailman id 171051.312321; Tue, 24 Aug 2021 11:02:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUC5-0006PO-F6; Tue, 24 Aug 2021 11:02:13 +0000 Received: by outflank-mailman (input) for mailman id 171051; Tue, 24 Aug 2021 11:02:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2b-0001EC-B2 for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:25 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 94b400f2-f700-47d4-a60a-3018c7968342; Tue, 24 Aug 2021 10:51:25 +0000 (UTC) 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: 94b400f2-f700-47d4-a60a-3018c7968342 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802284; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iJZ2e3nfEOTMZ6VCfmOynps4uVIsfbwmPPxlvx4nL9s=; b=Oh8hDTdAgi+UdIkUmVkMGtBJMIaWbc1zqAKQcLENcSOvJbpqIDeA/K2s 0i0h4xtAtYSzb0Q5/266qlyVGW2t6nAkE7IRiLW9itO4CY6HqUWF7UfSV Z/QIoSfOfUEkKs9K+J5P9/x9ZBRnU8mvr15VYhqQDEGdTsQ7WyvCobp86 o=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: XV11iicS4d7/cF81GPwgEvK2EQEmjkOn5zSMUBM2cqRwD52fI8Dmvf9vaffgGbKUXbMnj3b9gc tBUv4yyQ9omLbj3f2wTr8gk/8ucwZ2rh0sW0NY9kfIcJSfynh5XJ+IObWqVxLLio88blA3PgZX 6Kkv3VMArC1Y3MdwvUdU1ea3o0BvhmPq/afWLg52gJ2xiJ/bFGqnlqMnQRf9Y/VczP5R/SM6VS GQPm7sRmUkapCLGP+d93MLnAb5ffN3crUCt7oFzCikct7kIpMoRM1Xt1bKsw9z42snF5NjWji7 kjLCqmOgr33lN8Mby/on6oAC X-SBRS: 5.1 X-MesageID: 52875467 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:DCquc66/WD6OrsE5LAPXwM7XdLJyesId70hD6qhwISY7TiX+rb HIoB17726MtN9/YhAdcLy7VZVoBEmsl6KdgrNhWYtKPjOHhILAFugLhuHfKn/bakjDH4ZmpM FdmsNFZuEYY2IXsS+D2njaL+od X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="52875467" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v7 19/51] build: fix arch/x86/note.o rule Date: Tue, 24 Aug 2021 11:50:06 +0100 Message-ID: <20210824105038.1257926-20-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802954686100001 Content-Type: text/plain; charset="utf-8" Avoid different spelling for the location of "xen-syms", and simply use the dependency variable. This avoid the assumption about $(TARGET) value. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v7: - fix typo in title xen/arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index dfcbd01bb4ed..29aa67ea371e 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -164,7 +164,7 @@ $(TARGET)-syms: prelink.o xen.lds rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]* =20 note.o: $(TARGET)-syms - $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $(BASEDIR)/xen-= syms $@.bin + $(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 $@ rm -f $@.bin --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802944; cv=none; d=zohomail.com; s=zohoarc; b=YWJAw8tIAlZYlZeO9LVOrh/ibusiBUyn4NMvUS42WQV3C/+oqDy0+I033RPFi73HlWB3BOUbXJ2x2Am8IPGFw9F6LQg0z7hgbB0TpAc28n0VFVZQQuH41nv0gQOAt444tWo7F47MyjHcJNFTXLR9G12bBOJAv+uW4bPwCkVwEwI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802944; 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=ClVUkK7QTugbOBVequeycSyHWW2L5kyalTFef/GFc/g=; b=Tgii8RRaIDALk7mJlGZRa2H2uBvQeHK7OL4bLYXhJdt0ObSf1bWajAf1fu9T2IQg+wbecSQLPpzMvm9Kq3cJ+07m1DhDBASSzzuXAQ3JYbL1kFnPBPq4GJJiDE1AHurbzUqNeWWtxAGQR6gYJyK9VX+ZGVouz5IqVEgYHg0lC34= 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 1629802944909423.9035371093436; Tue, 24 Aug 2021 04:02:24 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171028.312290 (Exim 4.92) (envelope-from ) id 1mIUBx-0004T2-EF; Tue, 24 Aug 2021 11:02:05 +0000 Received: by outflank-mailman (output) from mailman id 171028.312290; Tue, 24 Aug 2021 11:02:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUBw-0004K9-Ad; Tue, 24 Aug 2021 11:02:04 +0000 Received: by outflank-mailman (input) for mailman id 171028; Tue, 24 Aug 2021 11:02:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2g-0001EC-B7 for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:30 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ab13fdac-e976-4770-acbc-e1e8e94801f2; Tue, 24 Aug 2021 10:51:26 +0000 (UTC) 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: ab13fdac-e976-4770-acbc-e1e8e94801f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802286; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cHly7piTV/09q3M8YN1XfYbGfLVMKH8oLzqmNMH8ZNY=; b=a+TZdo1IeOS8mRC/AjetJkrjkqxhFPhk3mQWfJdV+ze5ovsIBqZjzlSN XYzEEM2fO6sJFY9KTL/5lfXr8t+DhJnEvqJmrC8Cz8IIbiYkyVR8LHZY1 GibxGjBH2rR1zLvKRWYzb/OXjxFErn8AFnfLcwlbP566GmrG4ACPlNn8A g=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: wstmAh46vNhiyRQ5qTYzPeStKmCCkj/kOn7UK/rPf7/C1EXG/PxTVJE7tVkLLfd6lXFqBfNBNo 1z7G8PpX7fNM5loNIwZedU+6aP7KVcrxDE20unZuRNmp0ZWLLdSrsM/SfAutNMXK9g7RFsrcL1 RMHUx+JY8Y1AccTlp0EtiyOWWj587St5lNizo2vPVTiwiwxiVcvRVFcKT5O+oIcA1CLPPpKPzN WnFBisMXfNuTrKoK/KgdPnMdvN80ofQHP7EDZ/YLWq1N4nMld/o81cqK3U4l7NHqrU3fk/Fcs6 MQV5FPWaiHqzvxWwTHbX01FG X-SBRS: 5.1 X-MesageID: 50772192 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:mqgKT6lAySSFoNzGzbshUcV3+lXpDfIU3DAbv31ZSRFFG/Fxl6 iV8sjzsiWE7gr5OUtQ4exoV5PhfZqxz/JICMwqTNKftWrdyQyVxeNZnOjfKlTbckWUnINgPO VbAsxD4bXLfCFHZK3BgTVQfexO/DD+ytHLudvj X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="50772192" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 20/51] build: avoid re-executing the main Makefile by introducing build.mk Date: Tue, 24 Aug 2021 11:50:07 +0100 Message-ID: <20210824105038.1257926-21-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802946577100003 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 reason 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": $(TARGET), which is moved to the main Makefile. Signed-off-by: Anthony PERARD --- Notes: v7: - new patch xen/Makefile | 69 ++++++---------------------------------------------- xen/Rules.mk | 6 ++--- xen/build.mk | 58 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 65 deletions(-) create mode 100644 xen/build.mk diff --git a/xen/Makefile b/xen/Makefile index b408d35b4af0..7f100845cdd0 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -45,6 +45,8 @@ export KCONFIG_CONFIG ?=3D .config =20 export CC CXX LD =20 +export TARGET :=3D $(BASEDIR)/xen + .PHONY: default default: build =20 @@ -279,11 +281,13 @@ 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 @@ -391,65 +395,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 f449669475bd..a49ca4ceca39 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -9,8 +9,6 @@ include $(XEN_ROOT)/Config.mk include $(BASEDIR)/scripts/Kbuild.include =20 =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 +34,9 @@ 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 +mk-dir :=3D . +include $(if $(wildcard $(mk-dir)/build.mk),$(mk-dir)/build.mk,$(mk-dir)/M= akefile) =20 # Linking # ------------------------------------------------------------------------= --- diff --git a/xen/build.mk b/xen/build.mk new file mode 100644 index 000000000000..369e1fe5c698 --- /dev/null +++ b/xen/build.mk @@ -0,0 +1,58 @@ +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 Sun May 5 07:12:38 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=1629802950; cv=none; d=zohomail.com; s=zohoarc; b=kgNylmIjMUxeCTeZ2mlbgj1aV01bg6CuGrdiNKqhp9yPgopqE3aHVYczT6pXEcXiWIitvxNyUPJ6F3GH2RMAdpBAz2shb+/bwShYM9PffHOVHEKQ9uxX0GWRr8oGlFWsElWKrm+ybt0urUz+eXEv6wZXwYZH0lGLIB/6OyqPRok= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802950; 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=Fd9+64lJq4KDQPU+MjMLtu4XmPtVbk5zuKUgwVuFjHk=; b=YsBNSNSMU2ypt40/VwgDhDNNfBOSz03jUdExmkJty1SeW560jLbtKszyVl677uUZgXmaz/KZJ5PJMvrEsK7yk9tfdcSMhX5+Mp/JnixySVY30uTiaoE/Kvko8UAvYvrXUF+7vgirX0H5iiiqKVAG4ifwi93sS26YG6heX2OFKE4= 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 1629802950271140.731143518924; Tue, 24 Aug 2021 04:02:30 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171032.312299 (Exim 4.92) (envelope-from ) id 1mIUBy-0004dG-Mj; Tue, 24 Aug 2021 11:02:06 +0000 Received: by outflank-mailman (output) from mailman id 171032.312299; Tue, 24 Aug 2021 11:02: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 1mIUBx-0004at-Az; Tue, 24 Aug 2021 11:02:05 +0000 Received: by outflank-mailman (input) for mailman id 171032; Tue, 24 Aug 2021 11:02:03 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2q-0001EC-BW for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:40 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a383b904-a75f-42e2-b22a-f5d75428bf56; Tue, 24 Aug 2021 10:51:29 +0000 (UTC) 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: a383b904-a75f-42e2-b22a-f5d75428bf56 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802289; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ui+BY0F0TRtPJ3eDZ5+KxMNHd28XswPS9MmRVT66jrE=; b=LOODNyByltSuy4o1SAC2+OXZ11+tNhMOPKh6bG0DaYntlkFY83PaVe9H mej4+cCVM0eZ+0bIhFj+YIcvNPLJGOvTO7+IlF9A579d3r2K7eKwoSi8/ WWPCtIjLHK7DBsNi8i6Pvajfi9eL2IYye8AHdeTqXCkuwmM7ddMbFCIH8 4=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: Z9UG7eg6GsKnDrcWXWdKaaOqYma/EzdXgtDFjV7xBXYDGIQCcQpUG4hHl/qHGEJ4azM9ZGsjC1 1fMCjRpKt0UDhQrWjyLa05p192wmTZud/SSNfby9tPDWgQq3UcZ2n3x0coNYdYkk9fzb1g98Xo hrsDc4t2TAuWyFKTrjzqhgod4vzOW9gGgO27G4wil19k9SGVMKfI6JVc7DyX2WHqD0Wx4AjzV/ bZ0eNQ9533X6clG8VC5Jo/ZlUkaiLh8EzA02ab3NCEKVGYTw7ErDcOcNQ2E8AmqSq91kieoJ5w fEtbYxQA5TRp3tsdtScu4Xlt X-SBRS: 5.1 X-MesageID: 51540914 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:yGeysawQjWlVbuwI6/S/KrPxkOskLtp133Aq2lEZdPULSKGlfp GV9sjziyWetN9IYgBHpTiBUJPhfZquz+8N3WBxB8boYOCIghrNEGgP1+XfKl7bamfDH4xmpM BdmsFFYbWdYmSS5vyKgzVQZuxQpeVvh5rY59s2oU0NcShaL4VbqytpAAeSFUN7ACNcA4AiKZ aa7s1b4xK9ZHU+dK2AdzU4dtmGg+eOuIPtYBYACRJiwhKJlymU5LnzFAXd9gsCUglI3awp/Q H+4kPED+SYwr+GIy3npi/uBqdt6ZjcIxx4dY6xY/0uW3TRY8CTFcFcsvO5zXQISaqUmS4XeZ H30mwd1oJImj7slyiO0GHQ8hil3zA053D4z1iExXPlvMziXTo/T9FMnIRDb3LimjwdVfxHod Z2Nliixu1q5NL77VXAzsmNUwsvmlu/oHIkn+JWh3tDUZEGYLsUqYAE5ktaHJoJASq/sekcYa FTJdCZ4OwTfUKRbnjfsGUqyNuwXm4rFhPDRkQZoMSa3zVfgXg8xUoFw84UmGsG6fsGOtB5zv WBNr4tmKBFT8cQY644DOAdQdGvAmiIWh7IOHL6GyWTKEjGAQO+l3fT2sRK2AiHQu118HICou WzbLoDjx9OR6vHM7zw4LRbtgvKXHiwGS/wz8023ekIhoHB X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51540914" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v7 21/51] build: set ALL_OBJS to main Makefile; move prelink.o to main Makefile Date: Tue, 24 Aug 2021 11:50:08 +0100 Message-ID: <20210824105038.1257926-22-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802952018100001 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, the 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 using "$<" 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: v7: - change, now things are in build.mk: no more prepare phase needed xen/Makefile | 15 ++++++++++++++- xen/Rules.mk | 14 -------------- xen/arch/arm/Makefile | 31 ++++--------------------------- xen/arch/arm/arch.mk | 2 ++ xen/arch/x86/Makefile | 29 ++++++----------------------- xen/arch/x86/arch.mk | 2 ++ xen/build.mk | 24 ++++++++++++++++++++++++ 7 files changed, 52 insertions(+), 65 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 7f100845cdd0..1dad20a95be6 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -271,8 +271,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) @@ -393,7 +406,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 a49ca4ceca39..2db13a8f9c54 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -8,26 +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 dc1d09c8b429..067c0d9844e4 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -73,14 +73,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 @@ -96,33 +88,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/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 29aa67ea371e..823f8fed4144 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -126,37 +126,20 @@ ifneq ($(efi-y),) CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI endif # $(efi-y) =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 $(@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 $(@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 \ @@ -209,7 +192,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 @@ -238,7 +221,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 98dd41d32118..61e0222f4a08 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 369e1fe5c698..9093d9f493bc 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -56,3 +56,27 @@ 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") <$< >$@ + +# 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: ; + +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 Sun May 5 07:12:38 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=1629802968; cv=none; d=zohomail.com; s=zohoarc; b=aoVPIfaAp3gla2uyhOjrA5/e4AXfYP7tvCND/EXJAjGbjHHv+glAPrhZ4vlLmqfYnWzCFh6yP5waFyhcVSOApv+zZEU6XXGd8+jaL+r/tMzCNw2m4ujboLOrf+Sh8ipXY2Pk/gNF5oJsNmG3Zz2Y8XBsmFXVbNzDMts4nGtoQM0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802968; 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=/rckTiEPgLeFLKeDp75BapWnWi4C0qabU7nH3Fcjg3w=; b=R10YwM4dTf0bvqhO/NqWDiunFjQrGg79ZfKxpqplU7HcLUK/yYeMY6ntxS1HI1K8ZS4hy6SmPIkICzK7kc9SMUJKSoX2CNALaLdGXpW2HyMsfQYcFkqIaPQlr16S0tdcwBB3m0GZMyIugG8gLtLKypwhGEkX7p4yZm2qIvFI/i0= 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 1629802968916548.0952165271513; Tue, 24 Aug 2021 04:02:48 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171090.312398 (Exim 4.92) (envelope-from ) id 1mIUCQ-0002TA-1t; Tue, 24 Aug 2021 11:02:34 +0000 Received: by outflank-mailman (output) from mailman id 171090.312398; Tue, 24 Aug 2021 11:02: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 1mIUCP-0002Ql-Dy; Tue, 24 Aug 2021 11:02:33 +0000 Received: by outflank-mailman (input) for mailman id 171090; Tue, 24 Aug 2021 11:02:31 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2v-0001EC-Bm for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:45 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 714055d3-71f5-45a2-bd08-26768c2ca62e; Tue, 24 Aug 2021 10:51:31 +0000 (UTC) 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: 714055d3-71f5-45a2-bd08-26768c2ca62e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802291; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=d0FIxQLgS3m06o66H2kdnXXxs+1FaFuXUvl+kfpgKh8=; b=UAjbkAVYCtnWFEUczhr5e9+0MQyYTQw2UoMNUKtnuN3RID3guRqxdxHE Onnl28jtAFHKLT4DsWWnsn4sJ+jVy6geXLvPw3108JbX9gh5avPOX/+Ks y3UmzdDUSmEAXSsQvhjNdssRHSzcbrpAdaQwbWv1F/JJdfAoItB7I0Ayn 8=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: sYPAUQGBj8KLHLme6/xcfR/QGcAq8wnzdCvkDPbYeIk50CYLUT67Ripu0gmIXMxBWfo5f12QcB jzvaz45eZ+cMD7FkfMiFrT9msj2o1vHUKRz9k6Mw4ty3c51gssPkoSW5kxS2nuDVQKBZC37kij TNP2JBQCqlZrZbQbS89f9y46TB8f/ObKTI6WWMebZZagkItRLymaG7G+JLvz2DemNIVrI9ljLm swawhW9UP2ZjCS0p6XMqbHEe9AU++3+IGlt0LHD4Zu5NIh5hlTLdnFC4ARsCjj3uRB6MBAYYcN GBOltEcce20lUXdO+JRRLjM/ X-SBRS: 5.1 X-MesageID: 50772198 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:KEuBWatw5tiLkZxIESi97SUT7skDTtV00zEX/kB9WHVpmszxra 6TdZMgpHnJYVcqKQkdcL+7WJVoLUmxyXcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyIMbEQt6fHCWeDfOrIuOP3kpyVuQ== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="50772198" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 22/51] build: clean common temporary files from root makefile Date: Tue, 24 Aug 2021 11:50:09 +0100 Message-ID: <20210824105038.1257926-23-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802969599100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Makefile | 1 + xen/scripts/Makefile.clean | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 1dad20a95be6..f07c9251c030 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -382,6 +382,7 @@ _clean: $(MAKE) $(clean) test $(MAKE) $(kconfig) clean find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \ + -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 arch/*/include/asm/asm-offsets.h diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index 027c200c0efc..b6df9e861e6e 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -14,10 +14,8 @@ include Makefile subdir-all :=3D $(subdir-y) $(subdir-n) $(subdir-) \ $(patsubst %/,%, $(filter %/, $(obj-y) $(obj-n) $(obj-))) =20 -DEPS_RM =3D $(DEPS) $(DEPS_INCLUDE) .PHONY: clean clean:: $(subdir-all) - rm -f *.o .*.o.tmp *~ core $(DEPS_RM) =20 # Descending # ------------------------------------------------------------------------= --- --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802927; cv=none; d=zohomail.com; s=zohoarc; b=nnGXPZTLI9Ek1Kkqu4NEMH+0Q1agj8idUsHjBdyhsM6VEX46d/PE7YHhJ1ujkjH0JsLWwV6Uz7rFMHNMpup09B4f9E1e5pCH2GxpK6qtnxI+j7FTNLGVDO3xRpAu2Qyk6fufbCsR/rmXQXTAQbwFNLqdpOTu496lv5UDPxUyKAA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802927; 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=wldBCeeSMbqpT11L3LD7H56E+RRNQdEGEvyaqJ5G96U=; b=I+lohL/Nk6pVNG1Ap0SdzEb+mPFj/9K6gFv6zpicIjTVwfTRUpHBXETwA+jdLgxiVKIt40CrLCPJVCGpRq7Q31WEm1EDyPOYyhq7ViqxBCkZJIDhPICLKB05RwkAV9KqfVXwG1+eeRxe1R77E/KmsxclQXnySy68RQCJSVUfb00= 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 1629802927367359.13126758571525; Tue, 24 Aug 2021 04:02:07 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171001.312229 (Exim 4.92) (envelope-from ) id 1mIUBi-0000jv-Gy; Tue, 24 Aug 2021 11:01:50 +0000 Received: by outflank-mailman (output) from mailman id 171001.312229; Tue, 24 Aug 2021 11:01: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 1mIUBh-0000ab-3A; Tue, 24 Aug 2021 11:01:49 +0000 Received: by outflank-mailman (input) for mailman id 171001; Tue, 24 Aug 2021 11:01:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU3A-0001EC-CK for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:53:00 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 29d63f64-83ea-4e87-a250-534450e6dc50; Tue, 24 Aug 2021 10:51:33 +0000 (UTC) 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: 29d63f64-83ea-4e87-a250-534450e6dc50 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802293; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4Cv/yeAIlw+I3PqZSpnr4pgLY+dq26BTRMJUJxN2iw4=; b=Ic+EdWU+iNQ20et/vMjEMRVos2UXYAbtzZ38DrZ1+xpsbKIaPZtI4KTG uRi4RSxhLBOH6/YFUjzT1GJOkE52+komQvIp/Vr2mkq5fFsTR4Ds+VTP0 Ksz9JwiN9Gu3xbeBe/NKBGdi3EgY7G9O6MJbvaSkJRGdCySg/2YR+Z7rk U=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 9FiVE4Hs4ct/OKapHCfR5rlGmoKlsqritircRBdgizXln8eYCQSfrEPdzvpg+Wb50gMOqyyM6I U4n6x9r6z3+3YNywjuJ5NTTG9z6R9fuUsRFwfZPw7ZQBLFms7BIEZYKMNuYmPdp03qWloDHWHX StxNqj8bZjbXG8dLRjOzevdAUsMhubxd835QZn9/Dc6FA4eU32SyvtwjpI/UP2V3x5YhZOPGgR OfuswxZBknMXDBbiLevguqB+vKtbX++9h/hO/iAWqpxlEBDtrXqo1hDuNUXHvdO98PE9mKlQfX uvPAjAHTkRzDI1lIlk9Y5fH8 X-SBRS: 5.1 X-MesageID: 52875482 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:+Q4/jqDdYsCUQjjlHegQsceALOsnbusQ8zAXPh9KJCC9I/bzqy nxpp8mPEfP+VAssHFJo7C90dq7MArhHP9OkMIs1NiZLW3bUQeTQr2KjrGSiQEIeReOkdK1vJ 0IG8QQNDSaNykYsS+O2njcLz9W+qjkzEnHv4bj5kYoaTsvR7Br7g9/BAreOFZxXhN6CZ0wE4 fZztZbphK7EE5nIviTNz0gZazuttfLnJXpbVotHBg88jSDijuu9frTDwWY5BEDSDlCqI1Svl Qt0jaJqJlLgcvLiiM05FWjrKi+X+GRiOerMfb8y/T97A+czzpAKr4RH4Fq9wpF2N1HoGxa6+ Uk5S1QcvibokmhBF2dsF/j3RLt3y0p7GKnwViEgWH7qci8Xz4iDdFd7LgpBCcxxnBQyO2U6p g7qF5xdqAnfC/ojWD4/ZzFRhtqnk27rT4rlvMSlWVWVc8bZKVKpYIS8UtJGNNYdRiKoLwPAa 1rFoXR9fxWeVSVYzTQuXRu2sWlWjA2Eg2dSkYPt8SJ23xdnWx/zUEf2MsD901wva4VWt1B/a DJI65onLZBQosfar98Hv4IRY+tBmnEUXv3QRevyJTcZdM60lf22uDKCZkOlZ2Xka0zvegPcc 76IS5lXEYJCj3TINzLx5tW7xyIW3m5UV3Wu7Fj26Q= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="52875482" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 23/51] build,include: remove arch-*/*.h public header listing from headers*.chk Date: Tue, 24 Aug 2021 11:50:10 +0100 Message-ID: <20210824105038.1257926-24-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802931897100003 Content-Type: text/plain; charset="utf-8" $(public-y) contains "public/arch-%" but when used by $(PUBLIC_HEADERS) $(public-y) is filtered-out by the pattern "public/arch-%". So $(public-y) content is never used. Signed-off-by: Anthony PERARD --- Notes: v7: - new patch xen/include/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index 95daa8a28975..65a938a66555 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -39,9 +39,6 @@ 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) - .PHONY: all all: $(headers-y) =20 @@ -81,7 +78,7 @@ ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH)) =20 all: headers.chk headers99.chk 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 public/arch-% public/dom0_ops.h, $(wildca= rd public/*.h public/*/*.h)) =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)) --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802913; cv=none; d=zohomail.com; s=zohoarc; b=J2myKzXUuLvCqmG6/qEbO98a4rgY2WtwqNrTAHPX6Oy5J6dl0bPlrzcao9PFWfwiaLRBsBDX0ROes9AyA7/G6C6Dqf501VBiNtWv0aIRW9BlThLLk93uNy4Q36z0X+YrkR3XXGu27dWlkFEKSw7Oq9g3aqTO+wiFakp5GPYvA1Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802913; 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=xEhtevX9W28KOzeshbNQfVMrKHEYHHBajVlCmsLsDfk=; b=aeDSDqmrXdMXeiCMBAWQy66cCubyFgaha3m2s0A4r3jBADhGVQWnmZEc2jkMVp07S0JvPEVbUcpqIKLlvU7ApgT+fd4Vmn6hcQGIblSWI+PqYY/eR6u/ArhYUq4q+tOyRVPP89+0dic2//uO9GRGyuZ3XHvcrVATZz637QAiies= 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 162980291394215.113671820531067; Tue, 24 Aug 2021 04:01:53 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170979.312144 (Exim 4.92) (envelope-from ) id 1mIUBS-0005dT-67; Tue, 24 Aug 2021 11:01:34 +0000 Received: by outflank-mailman (output) from mailman id 170979.312144; Tue, 24 Aug 2021 11:01: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 1mIUBR-0005ZD-Jr; Tue, 24 Aug 2021 11:01:33 +0000 Received: by outflank-mailman (input) for mailman id 170979; Tue, 24 Aug 2021 11:01:31 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU3F-0001EC-CT for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:53:05 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 33cfbd9a-2a67-489c-8e26-e8d7916239e1; Tue, 24 Aug 2021 10:51:36 +0000 (UTC) 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: 33cfbd9a-2a67-489c-8e26-e8d7916239e1 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802296; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NvEmkqOo6yXRkyt9zgrXIkN+iDNV5iXFphMHOhlw3oc=; b=DG/vsRqO3evCdiqIJq4UGEbcPZgdXdUJnS6R29d/vje58tCXUsAqJwY5 PXnQyjFVL+9waGyctP6mRMPH9l4rZleVC8zGd3uj3ZL4uhyibgpdieaCY tH1fNWOfiTqPc3WGZHM6Fuvny2UOF0huxLmwjwiDngFBT4zc3Y6Wmjc42 k=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: mNNC3bn4bAW4fwvZWVPVixEXj6s4n/M/b8LKt12PUoL/x1TVxHSvnnUJd+mPFUd/9wo9wOi55R 4226qXYoyFScOKwP0JDiUthFHmWxqf9Zb0S3Hz5NVq7qL1QdbM9o/wm8vLrl1Tb/6DLTB0bXif Z1b1rKSYX8aSu2GfjdhRbX7CPBcawYf5Yv6/ERVFTxiyZ6/1QMLLpBWzSEoV5DS/YV+vtSa9eL jMtQNJuyPJ4f4qSCEiyPolksqBaK071ozr3UMhqlbr8NV+uSBJQlKOIVA+0KOae/N1G5RJDcoP DNlvLys3qAedXscgmhqtVFha X-SBRS: 5.1 X-MesageID: 51130762 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:1F6mVa5o/dkGyi9ZVwPXwDLXdLJyesId70hD6qkQc3FomwKj9/ xG/c5rsSMc7Qx6ZJhOo7+90cW7L080lqQFhLX5X43SPzUO0VHARO1fBOPZqAEIcBeOlNK1u5 0AT0B/YueAcGSTj6zBkXWF+wBL+qj5zEiq792usUuEVWtRGsZdB58SMHfhLqVxLjM2Y6YRJd 6nyedsgSGvQngTZtTTPAh+YwCSz+e77a4PeHQ9dmYa1DU= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51130762" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v7 24/51] build: prepare to always invoke $(MAKE) from xen/, use $(obj) Date: Tue, 24 Aug 2021 11:50:11 +0100 Message-ID: <20210824105038.1257926-25-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802921104100013 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 --- 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 | 40 ++++++++++----------- xen/scripts/Makefile.clean | 5 ++- xen/xsm/flask/Makefile | 36 +++++++++---------- xen/xsm/flask/policy/mkaccess_vector.sh | 7 ++-- 12 files changed, 101 insertions(+), 92 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 2db13a8f9c54..245efe705a1e 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 -mk-dir :=3D . +mk-dir :=3D $(src) include $(if $(wildcard $(mk-dir)/build.mk),$(mk-dir)/build.mk,$(mk-dir)/M= akefile) =20 # Linking diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 067c0d9844e4..9f9c73aa6c5d 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -88,18 +88,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 \ @@ -109,13 +109,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 823f8fed4144..bb2da0d013fb 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -82,7 +82,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 \ @@ -113,8 +113,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; } @@ -126,27 +126,27 @@ ifneq ($(efi-y),) CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI endif # $(efi-y) =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 $(@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 $(@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 $@ @@ -165,25 +165,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 @@ -192,25 +192,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 $(@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 $(@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 @@ -222,14 +222,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 @@ -243,14 +243,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 9b31bfcbfb8a..53d357489df2 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 =20 RELOC_DEPS =3D $(DEFS_H_DEPS) \ $(BASEDIR)/include/generated/autoconf.h \ @@ -11,10 +11,10 @@ RELOC_DEPS =3D $(DEFS_H_DEPS) \ $(BASEDIR)/include/xen/multiboot2.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) - $(MAKE) -f build32.mk $@ CMDLINE_DEPS=3D"$(CMDLINE_DEPS)" +$(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) + $(MAKE) -f build32.mk -C $(obj) $(@F) CMDLINE_DEPS=3D"$(CMDLINE_DEPS)" =20 -reloc.S: reloc.c $(RELOC_DEPS) - $(MAKE) -f build32.mk $@ RELOC_DEPS=3D"$(RELOC_DEPS)" +$(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) + $(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 65a938a66555..69224e22a950 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -40,53 +40,53 @@ cppflags-$(CONFIG_X86) +=3D -m32 endif =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_HEADERS :=3D $(filter-out $(src)/public/arch-% $(src)/public/dom0_o= ps.h, $(wildcard $(src)/public/*.h $(src)/public/*/*.h)) =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; \ @@ -94,7 +94,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)\" \ @@ -104,7 +104,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; \ @@ -113,7 +113,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 $@ @@ -123,7 +123,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 b6df9e861e6e..36b7e7e92f93 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 f4d4038c01bd..ab26b8682e46 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) cmp -s $(POLICY_SRC) $@ || cp $(POLICY_SRC) $@ =20 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 Sun May 5 07:12:38 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=1629802960; cv=none; d=zohomail.com; s=zohoarc; b=nC90Aoomjnqt586Z666UHcFAVgCeW7WsZp+40VVu50BKjaBv47M2sot+HUmSzJWRR8jSYfOx369X7inf9nr3w3Ib/MTaCASrl8RuyFm/VINnjFcTH4XMBeEGlvEwLcr548hImEM/tAYU3c62+rVA7nlBKPOc5aNyu2qiWWrKIsg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802960; 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=v9ynb5MdRgNPkZsKm7LJsrfdfFYu5u8ctQB7E1H9+Zc=; b=BmDvv6X1laZZT7D9cta79uCETXDmQJsha4Rr9uJ6ZgaOJfLFbWwZW9PrfVsaypGrvkuiGtXaTHLLOUxH3Szvj2cdEJaLd4dBOnJFmlpJakaAHJ3GxYG10XdrayZbaIVXxAGGm8O3PMM4yClXouFlRet3+1DLYT5A+iAP/jFyBYE= 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 1629802960439835.2215428860054; Tue, 24 Aug 2021 04:02:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171059.312342 (Exim 4.92) (envelope-from ) id 1mIUCA-0007Lv-7a; Tue, 24 Aug 2021 11:02:18 +0000 Received: by outflank-mailman (output) from mailman id 171059.312342; Tue, 24 Aug 2021 11:02: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 1mIUC9-0007H7-J7; Tue, 24 Aug 2021 11:02:17 +0000 Received: by outflank-mailman (input) for mailman id 171059; Tue, 24 Aug 2021 11:02:15 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU3U-0003Ux-DN for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:53:20 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 4f03605a-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:52:00 +0000 (UTC) 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: 4f03605a-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802320; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tyXShWdhRptLb0PMlNJcfYjoy4z6ZbWALAV+zNWtrDI=; b=DH5w8fCyFAo+oBF+wcK04t+GG0PnDPNc2cdyvGoTlmXibC9STvWf4aG+ UFO26C0Ar7I8K6iGDKrcYT72Vd/qWEh1pg0PBf2dMVuBZ3UcTBjroGoJU HsMXPQm4ZKQqjVTv6ag3nh6SE6fIkUmm1shZ6/vYIMQnahdBVUJ1pzj3x A=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: sEc01VfBThFuO0UAc+f5BJqKMOvCxA9LTQ87LdcF7g50tphwRarlTPCiWZ1HcBxnyTmFe73lbw fbu8ctAU6HoPp1m8lOmZUzzcIIQgUjPP85BEa/hgCB2zQPT4UiSL0inzxV98AeftDeoM5iwaLl TKuPtyhB3ZPNWGGjlF6CjrFH0UEmlNmScZJ6H1G4UAjMbSNmfHLXUMO1LX82MiEjIxMuVCAdjw w+uivzNnqTczGGbjxfhF+Rk/1RhljFd7sNbCzvUaFEsl7FBj3/zrACiT8B3ybdyqYnGkf7zIeg LbMTc2di2S1emxf2P08r9Pci X-SBRS: 5.1 X-MesageID: 52875488 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:7axdtKmgzsAdnoH/tQq8Zi3QYDjpDfOQimdD5ihNYBxZY6Wkfp +V8cjzhCWftN9OYhodcIi7Sc+9qXO1z/5ICPoqTM6ftWjdySCVxe5ZnO/fKlHbdREWldQtn5 uIEZIOb+EYZGIS5aqU3ODSKadC/DDzytHMuQ6o9QYOcegFUcBdxjY8LjzePlx9RQFAC5Z8Po Gb/NB7qz2pfmlSRtinB1EeNtKz6+HjpdbDW1orFhQn4A6BgXeD87jhCSWV2R8YTndm3aoiy2 7YiAb0j5/T/M1TiyWsmVM73a4m2OcJ+eEzR/BkTfJlaAkEvzzYJbiJnYfy+Qzd7tvfrGrC2+ O82yvId/4DkE85OFvF7CcFkjOQqgoG+jvsz0SVjmDkptG8TDUmC9BZjYYcaRfB7VE81esMpp 6j8ljpw6a/Nymw6xgVJuK4Ji1Chw6xuz4vgOQTh3tQXc8Xb6JQt5UW+AdQHI0bFCz35Yg7GK 02ZfusrMp+YBefdTTUr2NvyNujUjA6GQqHWFELvoiQ3yJNlH50wkMEzIgUn2sG9pg6V55Yjt 60e5hAhfVLVIsbfKh9DOAOTY++DXHMWwvFNCaILVHuBMg8SgfwQl7MkccIDcSRCeI1JbcJ6e j8uWJjxB0PkhjVeLCzNbVwg2/waXT4RjLw180b/IR9ttTHNcrWDRE= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="52875488" 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 v7 25/51] build: rework test/livepatch/Makefile Date: Tue, 24 Aug 2021 11:50:12 +0100 Message-ID: <20210824105038.1257926-26-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802960744100003 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. Signed-off-by: Anthony PERARD --- 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..563b323f0501 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..e59245323e92 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 Sun May 5 07:12:38 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=1629802983; cv=none; d=zohomail.com; s=zohoarc; b=ZB1EQT7O89mmHJ3LIEKbQS9Ktx5yJusuEGEpYjzL/O+1HH5e9cJb77wk4mq9hHUdYyMnK2iNs9o3M66lQkesxYhkz2QIOB67TTbJI0TqKhZ5Jld1Ko5IrDExlq6kcXm5h/sSp5ioHQuGkYxwghOZfzETSJ25Ff/7CfMybOJRFSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802983; 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=OgFy5YZ85mre4HMSyifqbrThKGpP28SYC0xMZBLHwww=; b=QdQNuVGS6nj0e7Qt5LUfG/juI64Onz0WNeLuLVsMBxUFvxfHfNERyVqo+/2jH3YtqTGf5ldaOPLvNn7tnsx/G+wfNbKwrtwWdLq85UAz7gEmPb8S27dHseWTGW3z7bYPy9JCIPpwWqdewWDvJPr0kc3+h3+fhEry50ZkNytVMcw= 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 1629802983709129.12740352198307; Tue, 24 Aug 2021 04:03:03 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171094.312417 (Exim 4.92) (envelope-from ) id 1mIUCT-0003AL-RO; Tue, 24 Aug 2021 11:02:37 +0000 Received: by outflank-mailman (output) from mailman id 171094.312417; Tue, 24 Aug 2021 11:02: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 1mIUCS-00032N-EQ; Tue, 24 Aug 2021 11:02:36 +0000 Received: by outflank-mailman (input) for mailman id 171094; Tue, 24 Aug 2021 11:02:32 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2M-0003Ux-Ab for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:10 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 442c60b4-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:51:42 +0000 (UTC) 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: 442c60b4-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802302; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TdKNukszEld9JKRQzybBCq8nOH8Vx/Vy7pEcmmcTSeQ=; b=POCXIsBcF+KnfpAnYTIDoVsQUhQVYGoL5oB/Laq4hUHzfkIOuLJ+siDW zokBjs2vbByvEz7MbglYvck0P4U7NRBlOBGtPakovp7V0uLPzJ6AKsPq0 XCPGn4DPN0keUswM3j89cywT1w17qo32rk5u2qwu3i+ybBE3lczjaidc7 8=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: cBxXxjoUroqeXBGgAFM9kQk2YXi/+a7wGWu7SI0LFS8ceYx/5PJTcbXFboUEcTrtuna1iZhWv3 v3lQTWYXWXF9Ud/MXV8wgXUvA7brA5Q2RjsHK7aAdqEpTdKxqPj5HAp52EUTs6Zas0V3Qb3eTd +6yLQix7z4jJgCNSDAnKOJ43hwd2WRsrQDcflsrYTczQlipA+xufFZiLR/ZTF/BcvjYGOGzF4T EdO+o3h3zJ7/tkEkkCzoQCehOq61LL3pFfOHoC3m3x0HFmMMpitbfc9u06xhqpUsD2YedM+yQ6 etxDDhcFFcHS4QVcsB+Zt9ga X-SBRS: 5.1 X-MesageID: 51153575 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:3PsJGa77GCZzInXraQPXwXSBI+orL9Y04lQ7vn2ZFiY5TiXIra qTdaogviMc0AxhPk3Jmbi7WJVoMkmsjKKdgLNhdotKMzOW3FdAQLsN0WKA+UyrJ8SdzJ876U 4IScEXZLLN5DNB/KXHCXyDYrMdKa68gcKVbInlrktFfEVPUeVN/g15AgGUHgldXw9dH6c0E5 Ka+45uuyegUW5/VLX2OlA1G8z44/HbnpPvZhALQzQ97hOVsD+u4LnmVzCFwxYlVS9Vy7tKyx mLr+W53NTsjxiI8G6d64bh1eUUpDIn8KoAOCW4sLlVFtwrsHfsWG0uYczHgNl/mpDW1L9jqq i2n/5nBbU/15qZRBDOnTL9nwbnyzog8Hnk1BuRhmbiu9XwQHYgB9NGnp8xSGqu16MMhqAJ7E tw5RPvi3OXN2KwoA3to9zTEx16nEu9pnQv1eYVknxESIMbLLtct5YW8k9ZGIoJWHuS0vFuLM B+SMXHoPpGe1KTaH7U+mFp3dy3R3w2WhOLWFILtMCZ2yVf2Hp500wbzsoCmWpozuN1d7BUo+ Dfdqh4nrBHScEbKap7GecaWMOyTnfARBrdWVjiVGgP1Jt3SU4ljqSHnondyNvaBKDg/aFC66 gpCmkoyFLaU3iedvGmzdlR9AzRTCGnQTHgo/sul6REhg== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51153575" 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 , 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 v7 26/51] build: build everything from the root dir, use obj=$subdir Date: Tue, 24 Aug 2021 11:50:13 +0100 Message-ID: <20210824105038.1257926-27-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802985965100001 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. 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. Signed-off-by: Anthony PERARD Acked-by: Bob Eshleman --- Notes: 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 | 28 ++++---- xen/Rules.mk | 134 ++++++++++++++++++++++++------------ xen/arch/arm/Makefile | 4 +- 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 | 16 +++-- 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 +- 16 files changed, 153 insertions(+), 101 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index f07c9251c030..eb9ea70aaa29 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -20,6 +20,10 @@ export PYTHON ?=3D $(PYTHON_INTERPRETER) export BASEDIR :=3D $(CURDIR) export XEN_ROOT :=3D $(BASEDIR)/.. =20 +srctree :=3D . +objtree :=3D . +export srctree objtree + # Do not use make's built-in rules and variables MAKEFLAGS +=3D -rR =20 @@ -45,7 +49,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 @@ -236,7 +240,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) @@ -339,10 +343,10 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) =20 .PHONY: tests tests: - $(MAKE) -f $(BASEDIR)/Rules.mk -C test tests + $(MAKE) $(build)=3Dtest .PHONY: install-tests install-tests: - $(MAKE) -f $(BASEDIR)/Rules.mk -C test install + $(MAKE) $(build)=3Dtest install =20 .PHONY: _uninstall _uninstall: D=3D$(DESTDIR) @@ -398,16 +402,16 @@ $(TARGET).gz: $(TARGET) =20 $(TARGET): FORCE $(MAKE) -C tools - $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h + $(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 $@ + $(MAKE) $(build)=3Dinclude all + $(MAKE) $(build)=3Darch/$(TARGET_ARCH) include + $(MAKE) $(build)=3D. arch/$(TARGET_ARCH)/include/asm/asm-offsets.h + $(MAKE) $(build)=3D. $@ =20 SUBDIRS =3D xsm arch/$(TARGET_ARCH) common drivers lib test define all_sources @@ -454,13 +458,13 @@ _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) + $(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 %.o %.s: %.S FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + $(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 %/: FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o + $(MAKE) $(build)=3D$* need-builtin=3D1 =20 .PHONY: cloc cloc: diff --git a/xen/Rules.mk b/xen/Rules.mk index 245efe705a1e..2e1435ff4ada 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -3,19 +3,29 @@ # Makefile and are consumed by Rules.mk # =20 -obj :=3D . 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 +ifndef obj +$(warning kbuild: Rules.mk is included improperly) +endif + # 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, \ @@ -51,27 +61,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 $(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 @@ -123,29 +160,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 @@ -156,21 +192,13 @@ 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),y) - cmd_objcopy_fix_sym =3D $(OBJCOPY) --redefine-sym $<=3D$(SRCPATH)/= $< $(dot-target).tmp $@ + 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. @@ -240,7 +270,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 @@ -251,6 +292,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 9f9c73aa6c5d..a3204d22d17b 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -93,12 +93,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/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 bb2da0d013fb..f60084eb73e7 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -81,6 +81,9 @@ endif extra-y +=3D asm-macros.i extra-y +=3D xen.lds =20 +# Allows usercopy.c to includes itself +$(obj)/usercopy.o: CFLAGS-y +=3D -I. + ifneq ($(CONFIG_HVM),y) $(obj)/x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label endif @@ -132,13 +135,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 $(@D)/.$(@F).0.o + $(MAKE) $(build)=3D$(@D) $(@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 $(@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) \ @@ -202,14 +205,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 $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o + $(MAKE) $(build)=3D$(@D) .$(@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 $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o + $(MAKE) $(build)=3D$(@D) .$(@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 61e0222f4a08..8bbf3e18e410 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-check-relocs :=3D $(shell $(OBJDUMP) -p $(efi-check-o= :.o=3D.efi) | grep '^[[:bla ifeq ($(efi-check-relocs),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 53d357489df2..2469ca7c4530 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 $(BASEDIR)/$(src)/defs.h $(BASEDIR)/include/xen/stdbool.h =20 -CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(src)/video.h +CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(BASEDIR)/$(src)/video.h =20 RELOC_DEPS =3D $(DEFS_H_DEPS) \ $(BASEDIR)/include/generated/autoconf.h \ @@ -14,7 +14,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) - $(MAKE) -f build32.mk -C $(obj) $(@F) CMDLINE_DEPS=3D"$(CMDLINE_DEPS)" + $(MAKE) -f $(BASEDIR)/$(src)/build32.mk -C $(obj) $(@F) CMDLINE_DEPS=3D"$= (CMDLINE_DEPS)" =20 $(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) - $(MAKE) -f build32.mk -C $(obj) $(@F) RELOC_DEPS=3D"$(RELOC_DEPS)" + $(MAKE) -f $(BASEDIR)/$(src)/build32.mk -C $(obj) $(@F) RELOC_DEPS=3D"$(R= ELOC_DEPS)" diff --git a/xen/build.mk b/xen/build.mk index 9093d9f493bc..c6c06d9f17f5 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -57,11 +57,15 @@ arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: asm-offs= ets.s echo ""; \ echo "#endif") <$< >$@ =20 -# 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: ; +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 =20 ifeq ($(CONFIG_LTO),y) # Gather all LTO objects together @@ -79,4 +83,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 69224e22a950..341196306abd 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -58,7 +58,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 @@ -83,8 +83,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 563b323f0501..62c7caeba1d1 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -59,6 +59,12 @@ ld-option =3D $(call success,$(LD) -v $(1)) # Usage: EXTRA_CFLAGS +=3D $(call cc-ifversion, -lt, 0402, -O1) cc-ifversion =3D $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $(2)000 ] && echo $= (3) || echo $(4)) =20 +### +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=3D +# Usage: +# $(Q)$(MAKE) $(build)=3Ddir +build :=3D -f $(BASEDIR)/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 e59245323e92..52ee58a08c5f 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 ab26b8682e46..57190ff6c8ad 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 $(BASEDIR)/$(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 Sun May 5 07:12:38 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=1629802927; cv=none; d=zohomail.com; s=zohoarc; b=ba3YFIn54qaELgHMItezi54dnC877zWV+TjNhYJV7Kg68tvVFGoWHFmWpeOcQ9Rz2sKZlUWAV91szIlH4OP/rShE8ORoCa6jKa0zu7F36fUCdE12+JZy/ydztF75rfTiCKBEHkcaMUpt4Q1SvVI+UfCUZNSNSJTXxsuQBX91AbQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802927; 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=DyjD1B1HXFVsW0RlAXEvLkG0/h9YAsm8+NK++l80aEI=; b=Ilh+TDsBb4CP3TTy/ERXDD3KkPFP3KENVzc9p7UbJ3+nYcj98yKWc7gRzjiJrtR/xBTEP685EsLruyH6cuZxoLxmYBWmjfEtKICPDsMashneJrV5WzwSq8q11A/wuG93Rjqi7Jrikq7ye2/JhzY9Lx1ZwMm+0npZVMv05gOy3Cg= 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 1629802927056195.8767171017522; Tue, 24 Aug 2021 04:02:07 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170996.312208 (Exim 4.92) (envelope-from ) id 1mIUBd-00087e-5W; Tue, 24 Aug 2021 11:01:45 +0000 Received: by outflank-mailman (output) from mailman id 170996.312208; Tue, 24 Aug 2021 11:01: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 1mIUBc-00083I-9S; Tue, 24 Aug 2021 11:01:44 +0000 Received: by outflank-mailman (input) for mailman id 170996; Tue, 24 Aug 2021 11:01:41 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2R-0003Ux-AZ for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:15 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 46e059c8-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:51:47 +0000 (UTC) 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: 46e059c8-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802306; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aX8fbbOJrw/glho2e/gRuUJr0uXwqlhwJqAv5f/9XQw=; b=SY9vzKbecohOr5v5XVXkVj1lr0wAvSbHYIFy5YyNWMcJ30Nv7bz3HTdt JA+8/BBiracH11Dvj/7lj5n6cRoFelvcZuQVnhNN/ufDJug2OoxORwaIJ xfphc5ZnzZUMSnFuPXDctKAmXDmGdvj6N7UHVbQc9ZXQKrgilnempfepr U=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: HFlbiZv665B8YfXjtD/xz/Bcsmgo//L/+dFt6uhkZhnBznxmOw2oogNSBxClYV42C5YRhG2Qw4 m6UTjzqWx+7eP+4XxMjPATBg4fSdQSr03lo+RF2/CZD6ZDeoNeC0ct9AhF8QctvnUV00el83UI hMwOom4shQBykew5TkVFTXNSlDL70tu1n3uQ9eBHapoEKjjYlwxth4lutsqrZS2npJaFvinbU0 QEoXpgCCSzsOODMevMDogSeM57ociXkFmMmr3uQUtATF4K0lzLsWWc24a9G57S1mWRsJ1HOtSH SxncRTP+otznwF3qV3H0bq1X X-SBRS: 5.1 X-MesageID: 51166374 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:mTumcqtNN+NVHS6FZPJt7vfa7skDTtV00zEX/kB9WHVpmszxra 6TdZMgpHnJYVcqKQkdcL+7WJVoLUmxyXcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyIMbEQt6fHCWeDfOrIuOP3kpyVuQ== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51166374" 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 v7 27/51] build: introduce if_changed_deps Date: Tue, 24 Aug 2021 11:50:14 +0100 Message-ID: <20210824105038.1257926-28-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802931685100001 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. This imports fixdep.c and if_changed_deps macro from Linux v5.12. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- .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 59a22d1685e2..550b38b9fa3c 100644 --- a/.gitignore +++ b/.gitignore @@ -338,6 +338,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 eb9ea70aaa29..1b5517b02a8c 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -187,6 +187,13 @@ endif 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 @@ -400,7 +407,7 @@ $(TARGET).gz: $(TARGET) gzip -n -f -9 < $< > $@.new mv $@.new $@ =20 -$(TARGET): FORCE +$(TARGET): tools_fixdep FORCE $(MAKE) -C tools $(MAKE) $(build)=3D. include/xen/compile.h [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch])= ; \ @@ -457,13 +464,13 @@ 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 $(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 -%.o %.s: %.S FORCE +%.o %.s: %.S tools_fixdep FORCE $(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 -%/: FORCE +%/: tools_fixdep FORCE $(MAKE) $(build)=3D$* need-builtin=3D1 =20 .PHONY: cloc diff --git a/xen/Rules.mk b/xen/Rules.mk index 2e1435ff4ada..9b8415160649 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -148,8 +148,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 @@ -206,7 +206,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 @@ -217,7 +217,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 $@ @@ -247,13 +247,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 $@ @@ -292,9 +292,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 f60084eb73e7..05f1d12065a0 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -248,7 +248,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 $@ $< @@ -264,9 +264,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 c6c06d9f17f5..537c32f42d25 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -37,6 +37,7 @@ include/xen/compile.h: include/xen/compile.h.in .banner F= ORCE $(call if_changed,compile.h) 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 62c7caeba1d1..aa3a8a1bd9e7 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 @@ -81,6 +80,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) @@ -109,15 +110,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 Sun May 5 07:12:38 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=1629802963; cv=none; d=zohomail.com; s=zohoarc; b=FvulpEff4yTneF9rZvs2729qCBU0SZUEMNn5Qx83KjqcLc3qdULHPhWNH3ROiTv3uUF/PFEKtFKZpzRvRTcB8zEdZIAJQUo1j6gKM5XBOMCrXHPQlzHNrehSL9QrDNIWOjHwpLP7OWXotCpv4hcgRa7pKf3s7Q64v2DP8hN/M8I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802963; 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=sRDMxgJYQ4m0wJYV039XqxfvA/HeUf1qL0Yswdt1LBA=; b=a3t7dkZd+ZYUawtAAqTFhDNVQEk+Eal7eSKgNZkKKVzHzMnbr1lECgfGmwmOAJFkaI4M08gSjFmPqyhZUvoPzY0QSWLbFklbX4UqC6VaqCMn4yxDS+NJ6NorxnJwf7m2jy88oEEGO2CRyUjVoenIf9GqITo2azlMoCFxh+ovdPU= 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 1629802963004262.3258788128928; Tue, 24 Aug 2021 04:02:43 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171077.312377 (Exim 4.92) (envelope-from ) id 1mIUCJ-00019Q-Mf; Tue, 24 Aug 2021 11:02:27 +0000 Received: by outflank-mailman (output) from mailman id 171077.312377; Tue, 24 Aug 2021 11:02:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUCJ-00017t-8Z; Tue, 24 Aug 2021 11:02:27 +0000 Received: by outflank-mailman (input) for mailman id 171077; Tue, 24 Aug 2021 11:02:25 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU3j-0001EC-Da for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:53:35 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 7f3296c2-4a59-43ad-a4bf-4b8d046730d0; Tue, 24 Aug 2021 10:52:00 +0000 (UTC) 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: 7f3296c2-4a59-43ad-a4bf-4b8d046730d0 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802319; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LKnefkuuFQC10LfXqSSu32yIG5VWHpcMy+rZtD5GY5M=; b=eEwAx4v1ZGiEb9pm3DxVtA7a2E1oZ8sqvm2mzMCSepGZemJFmbtgMBJ3 z7DTIjO1zeAchluBKQWHemO/LMAEuiWT5ioFr3nQgCNX/0mQgl1rc0xyN R6AZPFPqofLkj/9fpQ4iX6fkkhcpn+sS7on+ZDdGhVO59SaSU//gMVFoR k=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: hrtj/xVk7OBG1Xzg12jeuHsxK9i1d5xzj3+P6ioyBFUBqzTemmlde9WUQb/eFXhjQg5X06y0bi EopKUQOBhRor8ZclJLs2ZDvzs9lRpYUZESt5X01z7CmkcA+x3FjsrVjVU/205gsp4hkRzfftiN vlLgZ5rZ6n93g2ZKjj/bdGT03NxwNMXZjRxajznNJUurdaaq/LXFae1s0N1TpTryUST9fexErr 2Spxps7QL9qKca6knT1ZTJV+YjSLC86S8XKOGqVPtsMWi9yg9gdHy7jFMxWiXHfkdD7UkL9Kvs d7nWuQSPQimzGQRPzPOP5EmC X-SBRS: 5.1 X-MesageID: 52875493 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:poDF1q2GPhQGKok5wq2zgwqjBLQkLtp133Aq2lEZdPRUGvb2qy nIpoV96faUskdpZJhOo7G90cW7LE80sKQFg7X5Xo3SODUO2lHJEGgK1+KLqFfd8m/Fh4tgPM 9bAs5D4bbLY2SS4/yX3ODBKadC/OW6 X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="52875493" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk Subject: [XEN PATCH v7 28/51] build: rename __LINKER__ to LINKER_SCRIPT Date: Tue, 24 Aug 2021 11:50:15 +0100 Message-ID: <20210824105038.1257926-29-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802965002100001 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 --- 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 9b8415160649..a62c761be8d1 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -257,7 +257,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 Sun May 5 07:12:38 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=1629802979; cv=none; d=zohomail.com; s=zohoarc; b=NmtyKqe/d5l2o0BWQXQ9yS6nMs3YRfwzzSaUGuT9l6u3pDnrEVs1NNDuKEUq1ItcxsS9tpelO7Zb5F6jDYOQC9vh9hlZRyq7sKo+6B/qnRY0w0pwqnoAI0/nXCpiCBzHMqoBhPb5N5z7KMD0MaL0eyv2dud2yQY5fS04ooSbXf8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802979; 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=uqlaGqH7K7jfySelGkoeqRAFKfMpdb7KPCsNCslOjSc=; b=ByeFhX89NQtPOWwzCb++mEIj+QVgcAxBcVy4UkWBn+Amuo8LG3H3X42QufLETmeSYdavyPU9spZWLSXNSASHT4Ex5MDeRNc+XiyYsE4y9QZtjc/8mPHWsUI8SUdwYTubIw+LhWZv9cnO4IHLPbPUG4LK2v7x/myXHiSZw/cZrCQ= 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 1629802979713225.2241992176663; Tue, 24 Aug 2021 04:02:59 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171096.312429 (Exim 4.92) (envelope-from ) id 1mIUCV-0003ZV-ME; Tue, 24 Aug 2021 11:02:39 +0000 Received: by outflank-mailman (output) from mailman id 171096.312429; Tue, 24 Aug 2021 11:02: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 1mIUCU-0003Ql-3v; Tue, 24 Aug 2021 11:02:38 +0000 Received: by outflank-mailman (input) for mailman id 171096; Tue, 24 Aug 2021 11:02:33 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2b-0003Ux-At for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:25 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 48f60f1f-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:51:50 +0000 (UTC) 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: 48f60f1f-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802310; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YhvmbSKSt9wr4FJapgNfP9qgY+cjnLZoYpUfU64Omx4=; b=OD124aVh5dRg4IkQW1Th7urGn+hmXAS6zJafypl5xQyaYyviSd53ebBh Q70QTzXwOGLD6iJN09C07GUA5tPFFVeSnxWJkhXIY0dXHGENJbPCbFFd6 x6V9PQQK9fVymGysjW0U1xodvSsSRR+74ibFC0VGYop1FYJ+WhptImKQa Q=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: Sznb641ImOy9jyj6Kijbb4mP9qWLSYcVPgJISeJFmPQTfDExDsNe0FhZmPF9wtvzSY5GDhz3dg 0yxtde55cFuxJMRccrivKELVrB5O3Htw0oI1FMV28nIpgr+HV55kepeFkMPmY+9mOoEYF6p4rd Si0JD2i1o+GijjpLL60IHVwTQLMiugx7y6KMBJwAjaRVqM4fBxjG1T2ynoWawozeXKV8mixcGR 9C/lWBkEXIxoNgfhiVX8OpZ7k1Jvw5Qd/lnQM9s+kCvZ2EHE26H7VgPDGORYZUNlPELTpjL7xR STXfwmjVaBrqVUiTus7fK1fE X-SBRS: 5.1 X-MesageID: 51166384 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:M6310qBubL9GktnlHelW55DYdb4zR+YMi2TDt3oddfWaSKylfq GV7ZAmPHrP4gr5N0tOpTntAse9qBDnhPtICOsqTNSftWDd0QPFEGgL1+DfKlbbak/DH4BmtJ uJc8JFeaDN5VoRt7eH3OFveexQv+Vu88qT9JnjJ28Gd3AMV0n5hT0JcTpyFCdNNW97LKt8Lr WwzOxdqQGtfHwGB/7LfEXsD4D41qT2fIuNW29/OyIa X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51166384" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 29/51] build: add an other explicite rules to not build $(XEN_ROOT)/.config Date: Tue, 24 Aug 2021 11:50:16 +0100 Message-ID: <20210824105038.1257926-30-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802981308100001 Content-Type: text/plain; charset="utf-8" GNU Make will try to rebuild every Makefile included with the "include" directive, so everytime Config.mk is used, make will try to build ".config". This would normally not be an issue, unless we happen to have a rules which match. This is the case with Kconfig in xen/. While we had a workaround in "xen/Makefile", this ".config" files becomes an issue again in "xen/tools/kconfig/Makefile". It has a target "%.config". Signed-off-by: Anthony PERARD --- xen/Rules.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/Rules.mk b/xen/Rules.mk index a62c761be8d1..f1043a78a332 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -11,6 +11,10 @@ __build: -include $(BASEDIR)/include/config/auto.conf =20 include $(XEN_ROOT)/Config.mk + +# Don't try to remake this file included by Config.mk. +$(XEN_ROOT)/.config: ; + include $(BASEDIR)/scripts/Kbuild.include =20 ifndef obj --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802909; cv=none; d=zohomail.com; s=zohoarc; b=OvE+XVLB3tvfE1mrYAzfJXCLbhW/5Fah9QQjT/B+3Im9tTCXkwyVP1FuO0riDu035laO9GE6dcCmih2Q2SQce0DI4g4IH0h+T8k0zWgQvwDzoJJk86q438Qcpdjzg6s1oQinNCyppGHs7ZD/TpxCRj7jAcaAAFQHOVSRXSjFcOs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802909; 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=SdkoIAf64GqmiUrE8E2Tymgap8iPNgyc1eX03U9hG0c=; b=Y2IA//X5yhNFxUNpC65N7X6aQuoY0QH/IttMNxTJqGAJL8b/Gt8ZqN7NhygRC7l5hy5iY7saU5ZGsrl3XFlLmkXCXjMS3qtGoriTWPQZQvtZVCbM5Y5yqMX9Q9du4172f4cF/M7G0JBlkP18sGTTA/4N5T5uevm4SXpEFIG1iKk= 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 1629802909496384.31036968023466; Tue, 24 Aug 2021 04:01:49 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170965.312102 (Exim 4.92) (envelope-from ) id 1mIUBJ-0004IW-Nn; Tue, 24 Aug 2021 11:01:25 +0000 Received: by outflank-mailman (output) from mailman id 170965.312102; Tue, 24 Aug 2021 11:01: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 1mIUBJ-0004Hn-CK; Tue, 24 Aug 2021 11:01:25 +0000 Received: by outflank-mailman (input) for mailman id 170965; Tue, 24 Aug 2021 11:01:23 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2l-0003Ux-BE for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:35 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 48f60f1e-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:51:50 +0000 (UTC) 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: 48f60f1e-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802310; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8C0xAdMUUfkJ37y514dbn4rwdZzvKCfmub6TXPDdPqE=; b=KxTPTE6Qb92z08PH3mjjNxD8A3R2uLtqGnmM/A+vs4LTXPXuxY5SKxCk yzBm0bwT+F1HqaarS1R6vD8qzczTS+uN+EF17c0D2NrvT16KZFfASjnRW oHgDVEWNIL6Y8tGSear9M+hQF7rzuRwT2HawEM0R5M5750lR/qUHgW2iD A=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: zhf6Rgnp4MiaqAvZY4qkAEIxayiu1O1ZkOs98h5T3MxWkHVVJibf2yaDAmq61XI4aS5B/O77tZ 8VwP2spuwcTQUEK0q8cryluO9rt0AalnF+SCmqHtTi8XteYZ4SVYKEg0qOI2RRJcrd0zb7gZA3 sLHZk48w1/+iuA71aChzUAexRoUsonu8+SOZK0BMrYgSsY4jN6B5Ocxe1pQfZs7eMSFlhaKJGy /k8/WOMWs/YNKweZlU1A4A8NG6/z+EPPkiINZBLE/ved/MVzShwaAR7ynAX5MREJcgweKxWhaZ jGuVdTMgNrEbqWcgb9SzV3++ X-SBRS: 5.1 X-MesageID: 51540928 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:utxec6q07c76T4TACoUzwh8aV5uZL9V00zEX/kB9WHVpm5Oj+v xGzc5w6farsl0ssSkb6Ku90KnpewK+yXcH2/hqAV7CZnirhILMFu1fBOTZslrd8kHFl9K1kJ 0QC5SWa+eAQmSS7/yKhjVQeuxIqLbozEnrv5am854Hd3AJV0gU1XYcNu/tKDwSeOApP/oEPa vZwvACiyureHwRYMj+LGICRfL/q9rCk4+jSQIaBjY8gTP+zA+A2frfKVy1zx0eWzRAzfMJ6m 7eiTH04a2lrrWS1gLc7WnO9J5b8eGRiuerRfb8yfT9GA+czzpAV74RH4FqewpF591H3Wxa0u UkZS1QefibpUmhJ11d6iGdpjUImAxel0MKj2Xoz0cL6PaJOw4SGo5Pg5lUfQDe7FdltNZg0L hT12bcrJZPCwjc9R6Nr+Qg+Csa5XZcjEBS59L7tUYvGLf2qYUh37A37QdQCtMNDSj64IcoHK 1nC9zd/u9fdRefY2rCtmdizdSwVjBrdy32CHQqq4iQyXxbjXp5x0wXyIgWmWoB7os0T91B6/ 7fOqplmblSRosdbL57Bu0GXcyrY1a9Ci7kISaXOxDqBasHM3XCp9r+56g0/vijfNgSwJ47iP 36ISRlXK4JCjbT4Oi1rdB2Gzz2MRSAtAXWu7RjDsJCy8PBrZLQQF2+dGw= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51540928" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Doug Goldstein Subject: [XEN PATCH v7 30/51] build: hook kconfig into xen build system Date: Tue, 24 Aug 2021 11:50:17 +0100 Message-ID: <20210824105038.1257926-31-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802916259100001 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. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Makefile | 34 ++++-- xen/Rules.mk | 13 ++- xen/scripts/Kbuild.include | 31 ++++++ xen/scripts/Makefile.clean | 9 ++ xen/{tools/kconfig =3D> scripts}/Makefile.host | 3 + xen/tools/kconfig/Makefile.kconfig | 106 ------------------- 6 files changed, 78 insertions(+), 118 deletions(-) rename xen/{tools/kconfig =3D> scripts}/Makefile.host (98%) delete mode 100644 xen/tools/kconfig/Makefile.kconfig diff --git a/xen/Makefile b/xen/Makefile index 1b5517b02a8c..0da08bc39930 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -33,6 +33,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 @@ -156,6 +157,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 @@ -194,22 +202,19 @@ 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 # in tools/kconfig to make the *config target =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: FORCE - $(MAKE) $(kconfig) $@ +%config: tools_fixdep FORCE + $(Q)$(MAKE) $(build)=3Dtools/kconfig $@ =20 else # !config-build =20 @@ -219,9 +224,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 @@ -230,7 +241,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 @@ -391,9 +402,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 f1043a78a332..760ccff0e8f1 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -94,6 +94,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 @@ -272,7 +279,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 aa3a8a1bd9e7..3e436639da1c 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 36b7e7e92f93..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) +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 98% rename from xen/tools/kconfig/Makefile.host rename to xen/scripts/Makefile.host index 4c51c95d40f4..61c7bff7a9bb 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 $@ 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 Sun May 5 07:12:38 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=1629802910; cv=none; d=zohomail.com; s=zohoarc; b=Y98P3nX05qXxXzJL+WZXYLoxP0G0EE1YJLTLt1rs9jsjLepO2YWnHb6HKrIXEAdfDmIEAw5cz7QbDEyYr46ujaoh3svCyYBkIMhcH+TGWIZbY7DFW7fSYqGEJfxIIna0qOx34NW6+5U1o+Z9GIoXgMEgBleoT6mXh5eG6hC5Zto= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802910; 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=G0P06SQXyPa1PLBu/7DqS+3bAwvG1Wx6jAVSY01O0ih2rghNMFQgnyEcynmCwWQYABW9rnTaq3WYqsK2q3ZwsGgA6pyKRLMa4U2OBfhAYNDwlWuhb22lj4bARZFiZMqBOW98kV64b6aB1pO4qkfHIssDZQRxnz0ncI4NtlPdots= 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 1629802910609745.4151771835502; Tue, 24 Aug 2021 04:01:50 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170962.312086 (Exim 4.92) (envelope-from ) id 1mIUBH-0003un-RM; Tue, 24 Aug 2021 11:01:23 +0000 Received: by outflank-mailman (output) from mailman id 170962.312086; Tue, 24 Aug 2021 11:01:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUBH-0003ug-Ln; Tue, 24 Aug 2021 11:01:23 +0000 Received: by outflank-mailman (input) for mailman id 170962; Tue, 24 Aug 2021 11:01:23 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU2g-0003Ux-Ax for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:30 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 494f4692-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:51:51 +0000 (UTC) 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: 494f4692-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802310; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vEelbM4UoXbBjdC2Us5bYDimWRQuQticI4pfz6oeico=; b=AtqoZtSTf0BBr4W/oSLNxSVY5Zaw0EqmcVbxNYZiltMktQG0r8WcdY3H 8z+tcwCgfDLIiksRIzoVa2Vf2T+VxAOG363zSmiNF4Es7Df9MtUsUQCzQ k6UYZExK/C8cxShyQvOp+4s/vbhYvaIBXOaLNAyZqD6EgGEmJ/yGomZw/ o=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: K/J/akUfpicZ6OzK9IaEFb0RO9niAiRqNr7aZimZGWj5ic+hUsiB3DOwWn15nxWmazaz/lZ+PC nSxUYSxF4LlJdaqayN7IJJfWYA031dK8nR4uEnnFPJJwBTxFihoNdSHgIVY+vlUVOd2rN9HAGP 1WVYfGKEQ7tVsUTYM4Lw9sEJPFhetQykunHnIy2FVNAUR8Yu4WSjiH8F9D4STYjuYX8hSiXKmD wee8e4qRr/F2tgFOceRTrei1PIbt8e+hPfBqv6wJQeQHTzvbN9BXrA557ThYnk7kV7qKHaaEWq lLECsuzaxC6Sg8SRa4Uii0of X-SBRS: 5.1 X-MesageID: 50772220 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:a1Duva4RO7YUTBA3uQPXwPDXdLJyesId70hD6qhwISY6TiX+rb HJoB17726NtN9/YhEdcLy7VJVoBEmskKKdgrNhWotKPjOW21dARbsKheCJrgEIWReOktK1vZ 0QCpSWY+eQMbEVt6nHCXGDYrQd/OU= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="50772220" From: Anthony PERARD To: CC: Anthony PERARD , Doug Goldstein Subject: [XEN PATCH v7 31/51] xen/tools/kconfig: fix build with -Wdeclaration-after-statement Date: Tue, 24 Aug 2021 11:50:18 +0100 Message-ID: <20210824105038.1257926-32-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802917598100005 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 --- 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 Sun May 5 07:12:38 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=1629802971; cv=none; d=zohomail.com; s=zohoarc; b=H0UjFnwZ0FSbvxxGwU2xruym4R5qvw/7lA448Q25Kv87k/YVnn18N6g5YBVSxIb1nxjMir3ZAze4OCxwOxhkVNPajpTa/I3xiROUdsqXKUxvzUEAKgTQFrb4/nE3FmHanUtq3jyRLgPRt6cl8m1kEGklqbDpT1GRThoiGpEvSZU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802971; 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=XqXo0SoWE1+JS3pYz6AJeL9xvDD/R94zarCGtL6+5tw=; b=PxSDvJoxdbgCmlZ7q3+8KYTu+i+CjfMVH1cqoje6Ehb4h1Ekp3oFnLe+ZCfmJEogvdR2tLmMn5PwNcx63sbKBCnUwERM9duG2RKbB5iDedYCBv764XSs08geRneaxiQDI7SogrQyGnG9ouwoOymDAlgjsNCSNEfrpaprM3YwxEY= 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 162980297133019.02875596060187; Tue, 24 Aug 2021 04:02:51 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171088.312394 (Exim 4.92) (envelope-from ) id 1mIUCP-0002O8-5G; Tue, 24 Aug 2021 11:02:33 +0000 Received: by outflank-mailman (output) from mailman id 171088.312394; Tue, 24 Aug 2021 11:02: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 1mIUCO-0002Ns-W2; Tue, 24 Aug 2021 11:02:32 +0000 Received: by outflank-mailman (input) for mailman id 171088; Tue, 24 Aug 2021 11:02:31 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU30-0003Ux-By for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:50 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 4ac0e288-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:51:53 +0000 (UTC) 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: 4ac0e288-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802313; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3LBoylve6KlgEvEe96sCcK1Vf+QUAlZ8fbrbugBiOU8=; b=ILl5U66ImYEtUit2g3RKD2O0gx9AbhE7FHz54iadaqu1/NlLT77QOH93 mu/6wjqHPNSAuJw/wdy38IKUcBm3MJXKdYelcoQs30F/LYI2CK0ys9lh6 ioysvqhf4I04CLWNEW5906SeO2SpMkdHB8ODDdZsCY5gtJ6F5A7l6RJ1n M=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: RvwBttLgcRs/3mqKVUcYXvDwJUU4TpFPDc4SKEUbMFYI2GUFJuKf/RF4OcCOH4uVtkwuedPgDv n9vZBxdDQcsIPzuH5/ZaOaQrNg4bwAs9IfNpyS5djdhUp488pCU/Z0oQY/kq7ZA7sl7Rv+UV2l 8IDghnXJVqnnF10go4VIyOuyoicIZtcKZnWSw9yqHIXuZX7O/aRIuECHfchroESDA3YJs3DX3q wvsrikqcPiUuRoUwbp0ItK4SLn4ww7bBZgLDfrJterQFuPOgnhfvG3HOUaiZERiQQSpX0L7gYD u0SlaERXl+nQbJPoapQ4JYVA X-SBRS: 5.1 X-MesageID: 51130781 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:7WknQaEPu3uoe5RdpLqFVJHXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskd2ZJkh8erhBEDyewKkyXcV2/hbAV7MZniDhILFFu9fBOjZsnfd8k/Fh4lgPM 5bGsATZ+EYZmIK7voSlTPIdurIt+P3kpxA692+815dCSVRL41w5QZwDQiWVmdsQhNdOJY/HJ 2AouJaujuJYx0sH4iGL0hAe9KGi8zAlZrgbxJDLQUg8hOygTSh76O/OwSE3y0ZTyhEzd4ZgC f4ek3Cl+ueWsOAu1/hPlzontdrcRzau5l+7fm3+4kow/PX+0OVjcpaKvm/VXsO0ZmSAR4R4a LxSlEbTolOAjrqDxuIiAqo1A/63Dk07Xj+jVeenHv4uMT8ACk3EsxbmOtiA23kAmcbzaVBOZ hwrhWkXltsfGL9tTW448KNWwBhl0Kyr3ZnmekPj2ZHWY9bbLNKt4QQ8E5cDZ9FRUvBmcgaOf grCNuZ6OddcFucYXyctm5zwMa0VnB2GhudWEANtsGczjATlnFkyEkTwtAZgx47hdsAYogB4/ 6BPrVjlblIQMNTZaVhBP0ZSc/yEWDJSQKkChPmHb0mLtB0B5vpke+I3FwY3pDXRHU49upApH 2aaiIkiYcbQTOQNeSemIZM7g3ABH6gWDiF8LAv26RE X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51130781" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 32/51] build: Remove KBUILD_ specific from Makefile.host Date: Tue, 24 Aug 2021 11:50:19 +0100 Message-ID: <20210824105038.1257926-33-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802971743100001 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 61c7bff7a9bb..9d3730d28950 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 Sun May 5 07:12:38 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=1629802939; cv=none; d=zohomail.com; s=zohoarc; b=dIlleujxGHp9Zmas0X6EZ+7oWsVtTzxUSKEqn5GKUs5bLMCBR/4qUBtgjp2GPRWvVZkiSj+8jYIRrDxOtnIR6sHCedWyxAW2KAWAybaPbak7PTNPaMeOPOmJBfRlIQSGOFEyDwI1YM3gNp6doTRwzTbpZE+Mu/y4kjGb4M/UAGI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802939; 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=BWVIliu75YAJH2P+zon8mfJStGmEAwnchT8URcR4g8Q=; b=dHwU46Wn75clESiaMaRKyUCXlFoCe3oQGBW4GvrEv+XaVc2dm/oEFTStOJmk0O5xWDcQDyDyWKYP13r4Eraazc4dSAzGn1M5K2kH+16xZ1IqwBsX4u87jDa7AhjSMeZ+JYgXLmZocoOZJiFBW8pJ8lRPCOt1yOR4NiVbaiUwBFk= 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 1629802939188536.7517328033567; Tue, 24 Aug 2021 04:02:19 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171007.312248 (Exim 4.92) (envelope-from ) id 1mIUBn-0001iq-L3; Tue, 24 Aug 2021 11:01:55 +0000 Received: by outflank-mailman (output) from mailman id 171007.312248; Tue, 24 Aug 2021 11:01: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 1mIUBl-0001a7-Th; Tue, 24 Aug 2021 11:01:53 +0000 Received: by outflank-mailman (input) for mailman id 171007; Tue, 24 Aug 2021 11:01:47 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU35-0003Ux-CH for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:52:55 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 4ac0f07c-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:51:54 +0000 (UTC) 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: 4ac0f07c-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802314; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=e9beWPLZ66LkDKWINmxWgPLa0xieM3oPvCgwItf4tcI=; b=XmzDOKnGR9pzdJKVHd5HoinLupX8I3u04pKIjcv7rgxsV/XGV1dE3MQR cQxMWbYuoV8bvqWh73ExoyWqV6c5sXWIUndRzBo+ZWR1A/ubp6UtYXTfn Nv6JH3EYRXXraCZf8Amddv1Esq38A1vCExfidRJ1ml4LYg2LnecT8m9z/ o=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: uQI0xWw6n21OdE3SYcrHMrutDgUY0LW5tnZ4E0nWQw+8NYsU9hTv0iD8Zhazxx7FQc6hkn/Rz6 PQUOJyBpNUfWWf2XaFY03Hfj449KayKP5NqcB8xdGI18HuZJr2oijSawHFElU+al4avT/XSeJx mEilWVJuL+64xokcryCy92sAyGgmynCDTmmCNJxzQZLaprJalCm94F7uzh530KwvF24evO9Qzw x8oXka3JxEMVLiaeaHa6oK/2oJ9+Y3wcwrj9Je8fbK+R6ajXFLaTeWuOxkJY7ipt1H5mM4Rp4e uIxk78KhSaLEGwEMzuq6nD2S X-SBRS: 5.1 X-MesageID: 51166397 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:EoqMxKv1c282+cDtTctFItgn7skCyoMji2hC6mlwRA09TyXGra 2TdaUgvyMc1gx7ZJh5o6HnBEGBKUm9yXcH2/hpAV7CZnishILGFvAH0WKP+VPd8k7Fh6RgPM VbAs9D4bTLZDAX4voSizPIcOrIteP3lZxA8t2urUuFIzsKV4hQqyNCTiqLGEx/QwdLQbAjEo CH28ZBrz28PVwKc8WSHBA+LqT+juyOsKijTQ8NBhYh5gXLpyiv8qTGHx+R2Qpbey9TwI0l7X POn2XCl+qeWrCAu1HhPl3ontRrcejau5h+7Qu3+4oowwDX+0eVjUJaKvi/VX4O0aWSAR0R4a HxSl8bTr9OAjXqDyyISFLWqnPd+Sdr5Hn4xVCCh3z/5cT/WTIhEsJEwZlUax3D9iMbzadBOY 9wrhakXqBsfGT9deXGlqn1fgAvklDxrWspkOYVgXAaWYwCaKVJpYha+E9OCp8PEC/z9YhiSY BVfYnhzecTdUnfY2HSv2FpztDpVnMvHg2eSkxHvsCOyTBZkH1w0kNdzs0CmXUL8o47VvB/lq 35G7UtkKsLQt4dbKp7CutEScyrCnbVSRaJK26WKUSPLtBzB5sMke+E3FwR3pDVRHUl9upPpH 3xaiIqiYdpQTOSNSSn5uw1zjndBH66QSngjtpD4pQRgMyNeIbW X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51166397" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 33/51] build: handle always-y and hostprogs-always-y Date: Tue, 24 Aug 2021 11:50:20 +0100 Message-ID: <20210824105038.1257926-34-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802940857100003 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 760ccff0e8f1..1e1839c4b629 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -83,9 +83,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)) @@ -288,7 +296,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 Sun May 5 07:12:38 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=1629802958; cv=none; d=zohomail.com; s=zohoarc; b=JKKY93VB/N/nrjZnanmUhjj2SVz1Fw+K8Ov/qmFB5/52Q+MJ1gqDKmhW/XWWAsPJUJPbASvxp555fjFTqkgksltC2aXPrThTA5CgdMZD1cLw1TtnDZHAunfTOpK52vzdU83wbPPtIVhNrKiLlETxCVJ/i6IeQUpdCofmzaarjFQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802958; 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=gFhyFFVtdwcEUleXAVzsVOMSf3kzmnjDMzqnDMW0YAU=; b=XZ7zQCF9s5hg5t7xUuQU9r5/t6FYtLM9ZNZPOgaPitXCDlZ8Dexm25fvBbXn6U0iQuQSKH75tzRgOoowLKIhnT39UhXT/kj+0mKTp50/Xm3D95kKUp9oEcDiZbHuV1YoJ4rSYha5PYr4P91Zm7OZC+4/UiFLswTbo7qvNjY7OmA= 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 1629802958438987.5324700005946; Tue, 24 Aug 2021 04:02:38 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171062.312350 (Exim 4.92) (envelope-from ) id 1mIUCD-0007uR-3H; Tue, 24 Aug 2021 11:02:21 +0000 Received: by outflank-mailman (output) from mailman id 171062.312350; Tue, 24 Aug 2021 11:02: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 1mIUCC-0007qM-4b; Tue, 24 Aug 2021 11:02:20 +0000 Received: by outflank-mailman (input) for mailman id 171062; Tue, 24 Aug 2021 11:02:16 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU3A-0003Ux-CM for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:53:00 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 4d36b5c4-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:51:57 +0000 (UTC) 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: 4d36b5c4-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802317; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wW/BDoTYIi98jKK4f0OOhTS6gPpff2lS/nVP1UXR2wY=; b=fszwGlOZic1uPlXrJDOPWt6x8pI0BGZ1J9bzPmMwSqoQ1S+MznHvrxUs /9YTetgfk3pkbqfY3MezOLr63tZIsgjD0rvZQ8wa3cLnYEfvRt/0J1VhF iol8ts86quTMqciq3NahCrQT1HC4Gyw/ovnxsgJgeqfRqXV9ZDyncd8xd E=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: fQymMyhSu6fMPDLolqe1YislaJOwI/EgZchlmVuY6Wab/TP+cnxpPJ2lRwPtaOBxoeMo1YhjQl yvuGcnihz3OFywptmMXWTSgtQQWvU0sn+G14v9vtXhkNw/CoNEpkXdJwaPfEVpoRsoA9cfQOF/ p7UAM7beDTDoygLjF16d3gE4Omom/WlX+9I99xkJ6w+x54C5UkwwX8jsenSf2nhKkeWjuiPRJS ojb5KM0x609N6kta08fvjC6t7rhYKJESVMouXPcsSQPeXyzZ/odDswHCqv5luGVpYi+0mBX8ft eS0fvyKbm5no6djwagup9CF2 X-SBRS: 5.1 X-MesageID: 51540934 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:VsPt26EnnaZvrrPUpLqFVJHXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskd2ZJkh8erhBEDyewKkyXcV2/hbAV7MZniDhILFFu9fBOjZsnfd8k/Fh4lgPM 5bGsATZ+EYZmIK7voSlTPIdurIt+P3kpxA692+815dCSVRL41w5QZwDQiWVmdsQhNdOJY/HJ 2AouJaujuJYx0sH4iGL0hAe9KGi8zAlZrgbxJDLQUg8hOygTSh76O/OwSE3y0ZTyhEzd4ZgC f4ek3Cl+ueWsOAu1/hPlzontdrcRzau5l+7fm3+4kow/PX+0OVjcpaKvm/VXsO0ZmSAR4R4a LxSlEbTolOAjrqDxuIiAqo1A/63Dk07Xj+jVeenHv4uMT8ACk3EsxbmOtiA23kAmcbzaVBOZ hwrhWkXltsfGL9tTW448KNWwBhl0Kyr3ZnmekPj2ZHWY9bbLNKt4QQ8E5cDZ9FRUvBmcgaOf grCNuZ6OddcFucYXyctm5zwMa0VnB2GhudWEANtsGczjATlnFkyEkTwtAZgx47hdsAYogB4/ 6BPrVjlblIQMNTZaVhBP0ZSc/yEWDJSQKkChPmHb0mLtB0B5vpke+I3FwY3pDXRHU49upApH 2aaiIkiYcbQTOQNeSemIZM7g3ABH6gWDiF8LAv26RE X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51540934" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 34/51] build: start building the tools with the main makefiles Date: Tue, 24 Aug 2021 11:50:21 +0100 Message-ID: <20210824105038.1257926-35-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802960269100001 Content-Type: text/plain; charset="utf-8" This will make out-of-tree build easier. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/Makefile | 8 ++++---- xen/tools/Makefile | 17 ++--------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 0da08bc39930..8381ffd5d168 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -200,7 +200,7 @@ endif # root-make-done =20 PHONY +=3D tools_fixdep tools_fixdep: - $(MAKE) -C tools fixdep + $(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 @@ -228,7 +228,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 + $(MAKE) $(build)=3Dtools tools/fixdep =20 # Allow people to just run `make` as before and not force them to configure $(KCONFIG_CONFIG): tools/fixdep @@ -391,7 +391,7 @@ _debug: =20 .PHONY: _clean _clean: - $(MAKE) -C tools clean + $(MAKE) $(clean) tools $(MAKE) $(clean) include $(MAKE) $(clean) common $(MAKE) $(clean) drivers @@ -420,7 +420,7 @@ $(TARGET).gz: $(TARGET) mv $@.new $@ =20 $(TARGET): tools_fixdep FORCE - $(MAKE) -C tools + $(MAKE) $(build)=3Dtools $(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 Sun May 5 07:12:38 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=1629802948; cv=none; d=zohomail.com; s=zohoarc; b=QGpMC/ZAMVadbu1WWGCfaI/SyXe08bZNnHqElsOTfXhxW3P+esYWf5Hs5vQPGoVxUsMjypyImNwdOF/WLL8JVwno9FS6Vn7x7W/Vzrk9SFIYQw59qVqG78iF5VAsDHOxUzJdnln83DEg2DjrCYoGJE7Gf4UowMgYDMqXsY11WaU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802948; 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=Yb26nV+i6FokvZWXr4qnVIzEs6K/RBZafcFiilpeg9g=; b=b9q4ujfCLSJDhJ6In9N4tDb9Wkl0d5A9cUhsKzQy0AOq2yb4A1cFifmEimLcIMk41q/+eAJ6nIKMZXiBNu4nyPfxLVKWFaWQorp1DQirWTu9D0rrOuHB1+Jmu+3Gn80ClIAxlv+uOUzoui/pw+P0+yHVMUFw07jYXSNrzurKH/0= 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 162980294847517.501138044216532; Tue, 24 Aug 2021 04:02:28 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171044.312313 (Exim 4.92) (envelope-from ) id 1mIUC4-0005zp-31; Tue, 24 Aug 2021 11:02:12 +0000 Received: by outflank-mailman (output) from mailman id 171044.312313; Tue, 24 Aug 2021 11:02: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 1mIUC3-0005x9-E4; Tue, 24 Aug 2021 11:02:11 +0000 Received: by outflank-mailman (input) for mailman id 171044; Tue, 24 Aug 2021 11:02:09 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU3o-0001EC-Dm for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:53:40 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 68f546d2-c207-4731-818d-fce33251a239; Tue, 24 Aug 2021 10:52:00 +0000 (UTC) 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: 68f546d2-c207-4731-818d-fce33251a239 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802320; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eL+L/g0OFbmcLBVeQHSISwMI5xPrpz9PQZVTlfTI3z8=; b=Jgi6/5Y2vKTDWTOhRfLRlCXGw//4q0Z4lDgMgAkafGQPBaB0FTTs86UZ ot6eLHeSsKN3dYQA9zCQoBM5Z2Vi5JTvs2w5J6iu5DX5AGw9i5mWKOH20 IUuVyyAjiGPPwD+AWEhJRVtbZQTeZLhrldGLE11XtzJ36SzPnWI3/s6dP I=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: aNYs++s88y0oUPr7KFWX8745FZRW9raGVnJRewvDoxXdGKdZY9Qh2m5uk7XPCfn1uh8FSHxFSP lbpWviy8UUjWqLpY/EYTOGrSlVGftFyF1L+9cBCo/j3s0VHO2aEP1R3HdCK5I+CIleukBoqRU/ OPrLjjnR457CVBMgGFc+vEJIBqwVrvGIn8RP5ylVxdaWEzlEcOTG1ln0+tWyoo25qwdgmas6VD bRi2H/CC4oXC23TTqqUsqJqQ3yu0tqfAnt/QfJeh7WxgMHPx4YLLKk9Y1Md5VuIPp69PmFgxgO DCoTdw3twKRyOrHyEUg5/xGy X-SBRS: 5.1 X-MesageID: 51130784 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:vD1lU6v/1S1IbKQAjDDIC7yE7skDTtV00zEX/kB9WHVpmszxra 6TdZMgpHnJYVcqKQkdcL+7WJVoLUmxyXcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyIMbEQt6fHCWeDfOrIuOP3kpyVuQ== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51130784" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , Bob Eshleman , Alistair Francis , Connor Davis , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v7 35/51] build: Add headers path to CFLAGS once for all archs Date: Tue, 24 Aug 2021 11:50:22 +0100 Message-ID: <20210824105038.1257926-36-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802949044100001 Content-Type: text/plain; charset="utf-8" This just remove duplication. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- 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 8381ffd5d168..28854d6cb29f 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -293,6 +293,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 8bbf3e18e410..53b48ded28de 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 Sun May 5 07:12:38 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=1629802902; cv=none; d=zohomail.com; s=zohoarc; b=LuTR6Lp7NqaNTAsfWFaDOp3nP+SYbEOUMxc0hN3svv9uNYfwVYu7vpIMvcj4JYPPcPbcLIunMJkYhqp/dXMWErPxtazEV+6ZJgtv+wcVxk6c0kienm03YQa3Nh/BBnBqHfdTcKsciuqj9HS+9k/HXvh/R+HgeIrRwEq/2ybX/YU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802902; 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=BO7zAlApNWPpPhmiTNdzDwP045+qbmWc3x9Z4P8dBeU=; b=K9rJINhuLpGQacxMysTri0H5ugYxs+N1TB4W5LNffNMVKda4uK525odCGkuYgX7fqFeRFLMkJWFJq+0/gtbltca9jOXJtZyYnonGZ+ispEPknOpjzhP3qebgmSDaxfQwrqR+6/NWQj13m0mCckNlKZ9G4gZibBdfq7Y6CblGxfM= 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 1629802902465952.6238911113037; Tue, 24 Aug 2021 04:01:42 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170964.312097 (Exim 4.92) (envelope-from ) id 1mIUBJ-0004Do-40; Tue, 24 Aug 2021 11:01:25 +0000 Received: by outflank-mailman (output) from mailman id 170964.312097; Tue, 24 Aug 2021 11:01: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 1mIUBI-0004Ce-Vx; Tue, 24 Aug 2021 11:01:24 +0000 Received: by outflank-mailman (input) for mailman id 170964; Tue, 24 Aug 2021 11:01:23 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU48-0001EC-EX for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:54:00 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 40e21d5a-37bb-40ae-96b4-b3fcbf82905b; Tue, 24 Aug 2021 10:52:02 +0000 (UTC) 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: 40e21d5a-37bb-40ae-96b4-b3fcbf82905b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802321; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xRhF1EY/QRtV5cyAdngF/J6PljqQGZ9sLSwIGFFQ1do=; b=hBcBdXy9FfJCzsd/e5/GhnBBMA/1WIzrNPOnGm8ls/IdHeFrBf0dsRcq FTycmRIfhKasIDeRJMj+xITzM00Gcq0uqYTCIR2mccMVxryn114XeLHfC EHnVKxjwVsQv7CYMN/04mc/Tjt3oIhD3LQxxCR2bIfKVrFrPPz+jfdtrc I=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 8Pi9jibUCalk3QDJxoRQbBzIKB1rsgoQSyCyx3jEvp1739Chw+CAKXsS3nPyLTQKi4lJ2LJmlp ZED/8KyRElYy3zq537iHhcTJO9oIdkk5E3yUbVKXYbibAtjI2JwIHKdGYeUOAiV1Ho84xcR8fj g0xo7Ob5FBREY+1Rq8gHnw0R3XmftwqbcT5Z0pLSAQUhVjPEPBPLsv3NXxY5POZq2qprAa7xtS 73YaBvjVIRq4yCB36xskESOZpDX4e+I7x47rwpbyQrcpBxiQncYV+l5F2p4zNNIcYJsYhqPjkH SOBNCWP+kpCWGGGu23ZJtHOc X-SBRS: 5.1 X-MesageID: 51153594 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:fMZf2arIimsxEIPcRlDuP6YaV5uXL9V00zEX/kB9WHVpm5Oj+v xGzc5w6farsl0ssSkb6La90KnpexPhHO1OkPAs1NaZLULbUQSTXeVfBOfZrQEIeBeOvNK1t5 0QFJSWYeeYZTQUsS+Q2njaLz9U+qjjzEnev5a9854Cd2BXQpAlyz08JheQE0VwSgUDL4E+Do Cg6s1OoCflUWgLb+ygb0N1E9TrlpnurtbLcBQGDxko5E2lljWz8oP3FBCew1M3Ty5P+7E/6m LI+jaJqZlL8svLhCM05VWjr6i+q+GRieerw/b8yPT9Hw+cyzpAor4RHoFq8gpF5N1Ho2xa6O Uk6y1QRPibrUmhM11d6CGdoTXIwXIg7WTvxkSfhmamqcvlRCgiA84Eno5BdADFgnBQyu2U/Z g7q15xjaAnei8oXR6NluTgRlVvjA65sHAimekcgzhWVpYfcqZYqcga8FlOGJkNESrm4MR/ed MeRP309bJTaxeXfnrZtm5gzJilWWkyBA6PRgwHttaO2zZbkXhlxw8TxdAZnH0H6JUhIqM0rt jsI+BtjvVDX8UWZaVyCKMIRta2EHXERVbWPGebMT3cZdQ60rL22uzKCZAOlZ+XkbAzvecPca X6ISBlXDQJCj/T4OW1reJ22wGIW2OgQDio0d1a6/FCy83BeIY= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51153594" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v7 36/51] build: generate x86's asm-macros.h with filechk Date: Tue, 24 Aug 2021 11:50:23 +0100 Message-ID: <20210824105038.1257926-37-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802910069100001 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 05f1d12065a0..1ef2536ece26 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -233,18 +233,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 @@ -258,7 +261,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 Sun May 5 07:12:38 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=1629802916; cv=none; d=zohomail.com; s=zohoarc; b=LjoL9AzEpBNiy8WV+1KQaPFIi3P3YsFKnB+RtvykN3YB2n2vMPWDj5ywUsJprUjajSpiQm1MPvsyaTMv7G5XfFlKTXblS9HxN9Nq/pnVnjIxmjvSKRNrsHoUQ7zyOzfdkno8EDIoBfkPLhjMoxHrolz7nVitMc+1Fv8tiP8CNK0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802916; 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=IpLe04DoBp0aJk9P4TDEpP80SxF8aKX1KH8rcB1HS7A=; b=QhzPXWRfjKmuMe7z+HPHn2vsrbNcAWB6N61SNFEIRRMI1naizDNgG2J+8VZJH2dlH+qgLJdX3cfTZQBXP2nhUs/udI7a81lOdza3yElFezve8H9kXuOxHZeabiqkJwKGbnLDDiCEj3mgsTgDoAsJZZ2UW0vCzeK7ym8wokskyzE= 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 1629802916579701.1533469338003; Tue, 24 Aug 2021 04:01:56 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170980.312154 (Exim 4.92) (envelope-from ) id 1mIUBT-0005uA-BM; Tue, 24 Aug 2021 11:01:35 +0000 Received: by outflank-mailman (output) from mailman id 170980.312154; Tue, 24 Aug 2021 11:01:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUBS-0005pv-KW; Tue, 24 Aug 2021 11:01:34 +0000 Received: by outflank-mailman (input) for mailman id 170980; Tue, 24 Aug 2021 11:01:31 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU4D-0001EC-Eg for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:54:05 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 793aa3ad-c75d-43fc-bf1c-091d2a3119cc; Tue, 24 Aug 2021 10:52:04 +0000 (UTC) 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: 793aa3ad-c75d-43fc-bf1c-091d2a3119cc DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802324; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=peF07yApvAmonymrFonEMIY5XQyw9u/7Zv4cwXrx8fA=; b=MwK8I3rgEKS+PCXeyQzZ1o/FI/ibhhackQPeM+dRr5B7BsaKPBlVQbaz bp1WSWzfnCCfCJXue1WLPkfWrjnuYqMh7tNJ9Hkb+fZvzVxPgYC5/qNVw 6flfbLSlGKhhxsj1d5USd6gE8fbWy1o/SqRq6Y4UWHON8iqb/IgN8aSJ2 I=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: Xw9/UdIF15GytftMnKccpbXrN2UvK+wtd3B4MB07ib0vmF7VM7ZKWNUOfqbXSWfaMkR5hZxOgO LMEE4ZkeJyvRKPpbDRxKZ+Eiwx8Fh1S1RfYZSkc0rFZ0Q1SidII7PtUn8NCAEIGgi+TuXzVNvE n9Db8dtSEGrPofU7WR0jNKNdywEOhldxEWZ+qZj8pYmuaf+iNHHOHptLyL6R9uClNmNpAeS5I6 QW21FSOQuByifAQHWQTgkVE7LXGQuA5PTrb01xrXsXK4UDPfi0n+2Cw+nhbtvTN03YbLhKTyE7 06NkqoXf07oFpZwVI292/PMf X-SBRS: 5.1 X-MesageID: 51130789 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:wc/1sK2kOGZMf4gILori8QqjBQ5yeYIsimQD101hICG9Lfb0qy n+pp4mPEHP4wr5AEtQ/+xpOMG7IU80hqQFmLX5XI3SFzUO11HYSL2KgbGN/9SCIVy1ygc+79 YGT0EWMrSZYTdHZK3BkWqF+qMbsby6GdeT9IXjJhlWLD1CWuVF1UNUGwybGkp5SE1tHpwiDq eR4cJBun6JZWkXRt7TPAhIY8Hz4/nw0L72ax8PABAqrCOUiymz1bL8Gx+Emj8DTjJ0x6s4+2 StqX232kzjiYD09vbv7R6S031koqqj9jKFPr3PtiEhEESstu9vXvUlZ1TNhkFwnAjl0idTrD CFmWZaAy000QKdQoj9m2qW5yDwlDkp8HPs0lmenD/qptH4XiszD45biZteaQax0TtXgDhQ6t M+44uijeshMfoAplWN2/HYExVx0kakq3srluAey3RZTIsFcbdU6YgS5llcHpsMFD/zrNlPKp gnMOjMoPJNNV+KZXHQuWdihNSqQ3QoBx+DBkwPoNac3TRalG1wi0EY2MsclHEd849VcegM28 3UdqBz0L1eRM4faqxwQO8HXMusE2TIBQnBNWqDSG6XYZ3v+0i92aIfxY9Fmt1CVKZ4sKfaqa 6xI2+w71RCBn4GIff+o6Fj41TXRnmhUXD31sRTjqIJyoHBeA== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51130789" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Konrad Rzeszutek Wilk" , Ross Lagerwall , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v7 37/51] build: clean-up "clean" rules of duplication Date: Tue, 24 Aug 2021 11:50:24 +0100 Message-ID: <20210824105038.1257926-38-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802923102100015 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 --- 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 28854d6cb29f..950bee10ba38 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -410,7 +410,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 include/xen/compile.h =20 diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index a3204d22d17b..e6eff291c5e5 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -118,4 +118,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 1ef2536ece26..8d789d25a3ff 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -261,9 +261,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 52ee58a08c5f..dee5fd78c188 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 57190ff6c8ad..8d18c7d4ae6f 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -49,4 +49,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 Sun May 5 07:12:38 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=1629802974; cv=none; d=zohomail.com; s=zohoarc; b=fHOONjmtNkQvqLco8YQYPTEE9DkaL9tzD1tus7sTKKR5vGIElXAjulwn7P3KUxYCdiDN203+ARW8F0sm0XQbTaOQW8BAAZxAC6I2nqrm596DWH2vJWGE3jDBWz5NEXFr2zmaiONXI9NJMSEyAj4Ks4ItbGbLxsgA8us446fRtTI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802974; 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=yKZYc+4zvaHo7J+ATvxzRuya8b/yjKkrBtPIntv5ALg=; b=CybMJ90Dq7CXi0IrOMf2jSYaV46xzDcty6Fh6qS24HhCgFC7Rly3gC/EA36G+ldR+XEGjH7hhmZ83t1AaGdmglKuldrk6w8dVs+3qJEbiY61sZc/uGXJ1f4JDXZgzJMzWhDdLHPJtW5yef6FepS2OQ3H3oqnjxwc+NqzuMFS1MY= 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 1629802974641439.97918942171066; Tue, 24 Aug 2021 04:02:54 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171093.312411 (Exim 4.92) (envelope-from ) id 1mIUCS-0002vX-Bu; Tue, 24 Aug 2021 11:02:36 +0000 Received: by outflank-mailman (output) from mailman id 171093.312411; Tue, 24 Aug 2021 11:02: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 1mIUCR-0002tH-I6; Tue, 24 Aug 2021 11:02:35 +0000 Received: by outflank-mailman (input) for mailman id 171093; Tue, 24 Aug 2021 11:02:32 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU4I-0001EC-Ep for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:54:10 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id cca786e5-4f1f-443d-b239-80a662657c3a; Tue, 24 Aug 2021 10:52:06 +0000 (UTC) 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: cca786e5-4f1f-443d-b239-80a662657c3a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802325; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YqkngmqbOyk80Ogs6wi6iUK65m5ymQyiAu3hB6RVHmg=; b=Jke90/pLQlPPITvYR2vtlKNYEiuOi0NK/SW7aLrBKd6bJuFI3sEmhRY/ RwQ0qGvjJwfAz+7FafZcw1hQDo/XqHVQTJW1zHPv3F2AcUnKQnIdp+6BK ndQUx93MBDBkHRoStzo6Mn0PPasQjtLZ49pj2NXUz4NelBxkMC4pL0hfk A=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: tquOQgvreHZ6SpW/kIrdxcCK5RvNlb/9U9mUIcI6PsPfp6tv+tSBpkgUIWbEj4uu4v0crj6w1H l9s8ID0xDpqeK2mShpWmXt32T4+bA/nzQ9CE83Wmx169ROGkYTAmFwHy03lEiH+Ot+Kc/rMAhb MztP8LFrQXGtWiVPDN9vBscTjBxnIZbsgcDjbHDG8mBYDq1h7bl+fTbw9QKXFn5yUy3yozkxOV Lek9DPtjTXFuuvZHcgtD4ACt68R10dq/zyYF0Ndf+R7jtOks48J4u6cHtQGHN4ojNaY+Y2NSF6 k4h2gJWCI+ESC7xJ3xalL90h X-SBRS: 5.1 X-MesageID: 50772234 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:llMDB6sm5YNCNgSFYh7aJqhQ7skCyoMji2hC6mlwRA09TyXGra 2TdaUgvyMc1gx7ZJh5o6HnBEGBKUm9yXcH2/hpAV7CZnishILGFvAH0WKP+VPd8k7Fh6RgPM VbAs9D4bTLZDAX4voSizPIcOrIteP3lZxA8t2urUuFIzsKV4hQqyNCTiqLGEx/QwdLQbAjEo CH28ZBrz28PVwKc8WSHBA+LqT+juyOsKijTQ8NBhYh5gXLpyiv8qTGHx+R2Qpbey9TwI0l7X POn2XCl+qeWrCAu1HhPl3ontRrcejau5h+7Qu3+4oowwDX+0eVjUJaKvi/VX4O0aWSAR0R4a HxSl8bTr9OAjXqDyyISFLWqnPd+Sdr5Hn4xVCCh3z/5cT/WTIhEsJEwZlUax3D9iMbzadBOY 9wrhakXqBsfGT9deXGlqn1fgAvklDxrWspkOYVgXAaWYwCaKVJpYha+E9OCp8PEC/z9YhiSY BVfYnhzecTdUnfY2HSv2FpztDpVnMvHg2eSkxHvsCOyTBZkH1w0kNdzs0CmXUL8o47VvB/lq 35G7UtkKsLQt4dbKp7CutEScyrCnbVSRaJK26WKUSPLtBzB5sMke+E3FwR3pDVRHUl9upPpH 3xaiIqiYdpQTOSNSSn5uw1zjndBH66QSngjtpD4pQRgMyNeIbW X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="50772234" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v7 38/51] build: use main rune to build host binary x86's mkelf32 and mkreloc Date: Tue, 24 Aug 2021 11:50:25 +0100 Message-ID: <20210824105038.1257926-39-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802976346100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/arch/x86/Makefile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 8d789d25a3ff..4ea8ade7202c 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -81,6 +81,10 @@ endif extra-y +=3D asm-macros.i extra-y +=3D xen.lds =20 +hostprogs-y +=3D boot/mkelf32 +HOSTCFLAGS_efi/mkreloc.o :=3D -g +hostprogs-y +=3D efi/mkreloc + # Allows usercopy.c to includes itself $(obj)/usercopy.o: CFLAGS-y +=3D -I. =20 @@ -253,16 +257,10 @@ $(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 $@ $< - .PHONY: clean clean:: - rm -f *.lds boot/mkelf32 + rm -f *.lds 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 $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi rm -f boot/cmdline.S boot/reloc.S boot/*.lnk boot/*.bin --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802923; cv=none; d=zohomail.com; s=zohoarc; b=RkrLplkVQbE0jeNs4lJYtHNvF8It2yK3Q/acvb2deTxpXJR6ivSN51FIk1xv/EDSSGZnwBJlIMOlU0Wfpk+7lR3ACxNUkgZFGkni5SgSj+/vvAN2VNkHvm8/lmfcXxTTrajPxuT//h7pDzYuNAmytueqEBfHNaZC7ZouQrqBHoM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802923; 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=Msayidp6MbCg4MDDt62FrsIeafZSMUpOJ35ovWFB1go=; b=UsJJQEQ2N2ZWJV5QrK1D80im9YcM+SUAN9d00sDdQwvZULMjCULcLRQ8Kqm2vGIrHOO5uuOgN7vRN/b04ogw+sVyS66v5OpWLrH7rgCHzX9YMkm4UaG6TWvBK6F/2nBjz7cXcxT6FnQ60GLfWRWjSOl33ejDqelMXuqqOh3vyPw= 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 162980292376434.011887491385664; Tue, 24 Aug 2021 04:02:03 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170997.312209 (Exim 4.92) (envelope-from ) id 1mIUBd-0008EM-Dd; Tue, 24 Aug 2021 11:01:45 +0000 Received: by outflank-mailman (output) from mailman id 170997.312209; Tue, 24 Aug 2021 11:01: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 1mIUBd-0008Cy-07; Tue, 24 Aug 2021 11:01:45 +0000 Received: by outflank-mailman (input) for mailman id 170997; Tue, 24 Aug 2021 11:01:42 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU4N-0001EC-Ev for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:54:15 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6333f6ed-aaac-483c-a919-463de5858291; Tue, 24 Aug 2021 10:52:07 +0000 (UTC) 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: 6333f6ed-aaac-483c-a919-463de5858291 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802327; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0sdKoSvD950B0zcSvy6AS1vxf5zMM2TIt6vZB7gd6A8=; b=NR8eimQi/WDkegfaDQYT7Woa0iN2TliHISijXHP2P8wpRUXQPJrf1k+s tbO+ZRmgvLDQ5c/3+PGe94DzjBpm5g5PNYdaWJJFCKKT+3NXY3dFAQ+AK e3thryVLxxfQTDszuVc7csp+lktQvuQW2Ynp4klFDpCK4d0VNc86G1V9n Q=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 47z0dCT4csvYRb1sn4qDiS4fqAtWgx+7AaDOQknfgr+XufCsn6Zx6+K1Y3esQgWsvNoYj1PHjL xQ8amI4x8CiJDDeT0gIz49blFzcykp1VdqajMtcCiFVUb/t5LmFU9pR/QmC1wBAMJOIg59ufSp lx+KXWbX/HWOvzRl4a4TCE4Af7bTinz1JNoEwwT+cq1PFZ8T6WWB/YVIGP2jVNCfFYPgakTTmR gtYhEfURnfNYBAsGeASZUlt1yT7C5bkP9WVzR93Sh12SFy9csFSwNsAlIBFko83V5ZUAWtKs9E TMWlulfyuSLG8FOO1tZ7WJxb X-SBRS: 5.1 X-MesageID: 50772237 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:lkUgW6kN7KEec+8G0DPkOXZg4WDpDfOQimdD5ihNYBxZY6Wkfp +V8cjzhCWftN9OYhodcIi7Sc+9qXO1z/5ICPoqTM6ftWjdySCVxe5ZnO/fKlHbdREWldQtn5 uIEZIOb+EYZGIS5aqU3ODSKadC/DDzytHMuQ6o9QYOcegFUcBdxjY8LjzePlx9RQFAC5Z8Po Gb/NB7qz2pfmlSRtinB1EeNtKz6+HjpdbDW1orFhQn4A6BgXeD87jhCSWV2R8YTndm3aoiy2 7YiAb0j5/T/M1TiyWsmVM73a4m2OcJ+eEzR/BkTfJlaAkEvzzYJbiJnYfy+Qzd7tvfrGrC2+ O82yvId/4DkE85OFvF7CcFkjOQqgoG+jvsz0SVjmDkptG8TDUmC9BZjYYcaRfB7VE81esMpp 6j8ljpw6a/Nymw6xgVJuK4Ji1Chw6xuz4vgOQTh3tQXc8Xb6JQt5UW+AdQHI0bFCz35Yg7GK 02ZfusrMp+YBefdTTUr2NvyNujUjA6GQqHWFELvoiQ3yJNlH50wkMEzIgUn2sG9pg6V55Yjt 60e5hAhfVLVIsbfKh9DOAOTY++DXHMWwvFNCaILVHuBMg8SgfwQl7MkccIDcSRCeI1JbcJ6e j8uWJjxB0PkhjVeLCzNbVwg2/waXT4RjLw180b/IR9ttTHNcrWDRE= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="50772237" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 39/51] build: rework coverage and ubsan CFLAGS handling Date: Tue, 24 Aug 2021 11:50:26 +0100 Message-ID: <20210824105038.1257926-40-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802929174100003 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 --- xen/Rules.mk | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 1e1839c4b629..6877fcc2d6d8 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -131,19 +131,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) + +$(non-init-objects): _c_flags +=3D $(COV_FLAGS) + +# Reset COV_FLAGS in cases where an objects as another one as prerequisite +$(nocov-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(extra-y)): \ + COV_FLAGS :=3D 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)) + +$(non-init-objects): _c_flags +=3D $(UBSAN_FLAGS) + +# Reset UBSAN_FLAGS in cases where an objects as another one as prerequisi= te +$(noubsan-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(extra-y)): \ + UBSAN_FLAGS :=3D endif =20 ifeq ($(CONFIG_LTO),y) @@ -172,6 +184,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 Sun May 5 07:12:38 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=1629802978; cv=none; d=zohomail.com; s=zohoarc; b=Rd0Dpyim6yOYz+9azscimqKNm3BFnSDYa37DG86crd2qV496ybfM5KOUFBDf0Kg36DXFaKkt2xpqT89q8PY8SFw0FEDMsAMSSQRYto4AxzCjq8zu5LUVfvhcBDRp10r2/jkDDfUxJ4W+Gx/WjueFZBdsRAfOLmgpKQbrfiVTyw8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802978; 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=x9Yd/7K1brXmRJKFBTUGnPAFLB3YU0y1n1mhIEjOxaw=; b=BwyHbvyCD9Vk6zEfsWUBiBSZycXIpcsD4+FvbCexqpj3YvnB+3QMb4cqjXC5pt/Q20JALE+VBjwdIxasXgZjxwUeZA+UOdob/1WQ00pcT+eVBZHXvupdagI1le0ax+Mo/0M7HpfRnrKVdOMd8RZ3+Vy4gluiWdrAQRhnVgWNxDk= 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 1629802978542542.7286660659239; Tue, 24 Aug 2021 04:02:58 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171099.312436 (Exim 4.92) (envelope-from ) id 1mIUCY-0004AK-5J; Tue, 24 Aug 2021 11:02:42 +0000 Received: by outflank-mailman (output) from mailman id 171099.312436; Tue, 24 Aug 2021 11:02:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUCX-00046E-7C; Tue, 24 Aug 2021 11:02:41 +0000 Received: by outflank-mailman (input) for mailman id 171099; Tue, 24 Aug 2021 11:02:35 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU3j-0003Ux-Dg for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:53:35 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 54450de8-04c9-11ec-a8c5-12813bfff9fa; Tue, 24 Aug 2021 10:52:09 +0000 (UTC) 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: 54450de8-04c9-11ec-a8c5-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802329; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wyakQUKzvA/qzxlf5PAdsehWsfJUw3GHFdkxUbHnaEU=; b=fgMl12XMe+2bVu1ZMERv4LNW8R3efLb0VCsNaOIZ6Utii6J4vFjK8c+a 8WfDZFlr+yBX22DgCEYzdjRE6sjHxBNN2jxbsgSpsT26fLPPbRzFnhYlx Pu7swGgi2PJ4+uhqrzUCQafnrpc6LCaaLfQH9iy3ivAXcBcHLLyZCPMid 0=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: +iLW90S7GLk8lkL/fsZ7NSKAhaj88cz4KZgwV3HnAy2kFQk8b+7FvZGEWi4r4UjjVxt3YPm1ko X/A+YzI/NfZo201rcY/TKnxlSPDj6yi7kCF9EVm3PACF/NtbuyGoNrcznTNs3whxMW0ZY/kLvP mo8Vmy0LIz+gT1evkVnCocxeroOgkoUNLkWuP6V6Np9tYFd+kGgYjCSwZB02GR66XY79dm0vml o1K2ZWNOia8O+POLlLdTb00A0WAeHu7AJuBk3oT9bnHJjEdZvItZjBts9ZtRgHAoELQgoUUZN2 uljK7w1p5pGnL4LnhPP2F4m5 X-SBRS: 5.1 X-MesageID: 51166407 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:+ipPgKyntdoZT+CwHpOoKrPxkOskLtp133Aq2lEZdPULSKGlfp GV9sjziyWetN9IYgBHpTiBUJPhfZquz+8N3WBxB8boYOCIghrNEGgP1+XfKl7bamfDH4xmpM BdmsFFYbWdYmSS5vyKgzVQZuxQpeVvh5rY59s2oU0NcShaL4VbqytpAAeSFUN7ACNcA4AiKZ aa7s1b4xK9ZHU+dK2AdzU4dtmGg+eOuIPtYBYACRJiwhKJlymU5LnzFAXd9gsCUglI3awp/Q H+4kPED+SYwr+GIy3npi/uBqdt6ZjcIxx4dY6xY/0uW3TRY8CTFcFcsvO5zXQISaqUmS4XeZ H30mwd1oJImj7slyiO0GHQ8hil3zA053D4z1iExXPlvMziXTo/T9FMnIRDb3LimjwdVfxHod Z2Nliixu1q5NL77VXAzsmNUwsvmlu/oHIkn+JWh3tDUZEGYLsUqYAE5ktaHJoJASq/sekcYa FTJdCZ4OwTfUKRbnjfsGUqyNuwXm4rFhPDRkQZoMSa3zVfgXg8xUoFw84UmGsG6fsGOtB5zv WBNr4tmKBFT8cQY644DOAdQdGvAmiIWh7IOHL6GyWTKEjGAQO+l3fT2sRK2AiHQu118HICou WzbLoDjx9OR6vHM7zw4LRbtgvKXHiwGS/wz8023ekIhoHB X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51166407" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v7 40/51] build: fix dependencies in arch/x86/boot Date: Tue, 24 Aug 2021 11:50:27 +0100 Message-ID: <20210824105038.1257926-41-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802979143100001 Content-Type: text/plain; charset="utf-8" Temporary fix the list of headers that cmdline.c and reloc.c depends on, until the next time the list is out of sync again. Also, add the linker script to the list. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/arch/x86/boot/Makefile | 9 ++++++--- xen/arch/x86/boot/build32.mk | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 2469ca7c4530..73a3b1514965 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -2,19 +2,22 @@ obj-bin-y +=3D head.o =20 DEFS_H_DEPS =3D $(BASEDIR)/$(src)/defs.h $(BASEDIR)/include/xen/stdbool.h =20 -CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(BASEDIR)/$(src)/video.h +CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(BASEDIR)/$(src)/video.h \ + $(BASEDIR)/include/xen/kconfig.h \ + $(BASEDIR)/include/generated/autoconf.h =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 =20 $(obj)/head.o: $(obj)/cmdline.S $(obj)/reloc.S =20 -$(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) +$(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) $(src)/build32.lds $(MAKE) -f $(BASEDIR)/$(src)/build32.mk -C $(obj) $(@F) CMDLINE_DEPS=3D"$= (CMDLINE_DEPS)" =20 -$(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) +$(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) $(src)/build32.lds $(MAKE) -f $(BASEDIR)/$(src)/build32.mk -C $(obj) $(@F) RELOC_DEPS=3D"$(R= ELOC_DEPS)" diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk index 8cd5403926a3..e90680cd9f52 100644 --- a/xen/arch/x86/boot/build32.mk +++ b/xen/arch/x86/boot/build32.mk @@ -27,7 +27,7 @@ CFLAGS :=3D $(filter-out -flto,$(CFLAGS)) done $(OBJCOPY) -O binary -R .got.plt $< $@ =20 -%.lnk: %.o +%.lnk: %.o build32.lds $(LD) $(LDFLAGS_DIRECT) -N -T build32.lds -o $@ $< =20 %.o: %.c --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802922; cv=none; d=zohomail.com; s=zohoarc; b=iYJZHzopLzbuwn98H9x6Mwlmu7OXvO4cVMzjsI5vl8eC0DMigEGR2ATdfBCvCowIdwxx4WSAxUaMg12XNc98NJ0wqYxgT6Cvf/b4k9m3j4keAeFbiPobOYS8WCpIRrexCX35f9rlRtZtoOrD2Fle39R5Dv5leZ6XKM8ZEz3wqgA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802922; 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=p1OfMDec+Nj30VCXEIZHDM50mbf5/cKhS4scPhnoMls=; b=MWOIAl1qIRjxNzvbSCTul90LU4sGGRmws+4XOFFav3EqjKFlvvCFTDrP7E/N7C/ESO63BCpsuCMkY0GositVxPdsAg5HRvkRFV4uR63GOywxpQ1ea8EzKezIvmpMpZd/LlAMQn23LjEKk/21PWDhdGHNsDilOXBUyrd+STpkc3s= 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 1629802922916897.5338196313851; Tue, 24 Aug 2021 04:02:02 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170993.312201 (Exim 4.92) (envelope-from ) id 1mIUBb-0007tr-LU; Tue, 24 Aug 2021 11:01:43 +0000 Received: by outflank-mailman (output) from mailman id 170993.312201; Tue, 24 Aug 2021 11:01:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUBb-0007ri-6c; Tue, 24 Aug 2021 11:01:43 +0000 Received: by outflank-mailman (input) for mailman id 170993; Tue, 24 Aug 2021 11:01:41 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU3o-0003Ux-Dm for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:53:40 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 555758b2-04c9-11ec-a8c6-12813bfff9fa; Tue, 24 Aug 2021 10:52:10 +0000 (UTC) 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: 555758b2-04c9-11ec-a8c6-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802330; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9DhKzuHQgtLZwJkkZ8/kcJ7SrlG3Or2a9FCTUzxU3+k=; b=hZG1vhybvkCKFzONblFma/ZUHiH/pR1c25yfxyzNnjB+LPJiNR9xR25q 19PG/JEXdxQGVjldW6xhqOD3P9uyjtsQVpktPBo7qkyoXAAYLtaGbp7MB QydHgKKlWLd0UtG3BM2ufG7e0ZxzTljYkPiJDhNpI3/DIzeMs66y0/vOd s=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: /r2M2TNFXwPbrGLy1IZv6b3W19xSN/7Zks9Cg6hkhJKMndA4VHYE+5RA3wamuigjXwK6lw6w/M BLBnYS+WTLj91SwHYROPQdD1aVN0kGu33RFAFSNtp6WaiZxLp2+kPFsHN6wxU0qS9T2mPSl/yw n1HZurYZcW9rntabU1x/KwbqvZpdH/wryIcP4kYXrtaiexYjSCk3WMKVHIn39EYs294XcZQIJb mXMwU1OQM2sr9Pwj5GF7ZzhOpmz078LT+Cr0zQ3mNtF67vvyhMKXkDBMeB4m7aRK9SSEer/qcN 3xoU+c0WcbYYCZKMLb9eYuJb X-SBRS: 5.1 X-MesageID: 52875523 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:JWFcvqvGGspTaqJf1dK4XqoL7skDjNV00zEX/kB9WHVpm6yj+v xGUs566faUskd0ZJhEo7q90ca7Lk80maQa3WBzB8bGYOCFghrKEGgK1+KLrwEIcxeUygc379 YDT0ERMrzN5VgRt7eG3OG7eexQvOVuJsqT9JjjJ3QGd3AVV0l5hT0JbTpyiidNNXJ77ZxSLu v72uN34wCOVF4wdcqBCnwMT4H41qf2fMKPW29+O/Y/gjP+9Q+V1A== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="52875523" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v7 41/51] build,x86: remove the need for build32.mk Date: Tue, 24 Aug 2021 11:50:28 +0100 Message-ID: <20210824105038.1257926-42-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802928622100001 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. Thus we copy all the necessary flags from "Config.mk", and apply them only to "cmdline.o" and "reloc.o". Specificaly 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 symbole 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 --- xen/arch/x86/boot/Makefile | 60 ++++++++++++++++++++++++++---------- xen/arch/x86/boot/build32.mk | 40 ------------------------ 2 files changed, 44 insertions(+), 56 deletions(-) delete mode 100644 xen/arch/x86/boot/build32.mk diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 73a3b1514965..3580a9b656e8 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -1,23 +1,51 @@ obj-bin-y +=3D head.o +head-objs :=3D cmdline.S reloc.S =20 -DEFS_H_DEPS =3D $(BASEDIR)/$(src)/defs.h $(BASEDIR)/include/xen/stdbool.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) $(BASEDIR)/$(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 +LDFLAGS_DIRECT_OpenBSD =3D _obsd +LDFLAGS_DIRECT_FreeBSD =3D _fbsd +$(head-objs:.S=3D.lnk): LDFLAGS_DIRECT :=3D -melf_i386$(LDFLAGS_DIRECT_$(X= EN_OS)) =20 -$(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) $(src)/build32.lds - $(MAKE) -f $(BASEDIR)/$(src)/build32.mk -C $(obj) $(@F) CMDLINE_DEPS=3D"$= (CMDLINE_DEPS)" +CFLAGS_x86_32 :=3D -m32 -march=3Di686 +CFLAGS_x86_32 +=3D -fno-strict-aliasing +CFLAGS_x86_32 +=3D -std=3Dgnu99 +CFLAGS_x86_32 +=3D -Wall -Wstrict-prototypes +$(call cc-option-add,CFLAGS_x86_32,CC,-Wdeclaration-after-statement) +$(call cc-option-add,CFLAGS_x86_32,CC,-Wno-unused-but-set-variable) +$(call cc-option-add,CFLAGS_x86_32,CC,-Wno-unused-local-typedefs) +$(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 $(BASEDIR)/$(src)/build32.mk -C $(obj) $(@F) RELOC_DEPS=3D"$(R= ELOC_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 $@ $< 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 Sun May 5 07:12:38 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=1629802971; cv=none; d=zohomail.com; s=zohoarc; b=azifI18IFGamG43bTsQAFBVjpsLd5DuIWv+Dp7gILFuGv18UZS5rqf+iPqzeJIRChGwPtSTdh+otpZ7G7lhpbrU+IlNKSKSduU3Md0dUSeLfiZS1u5yV1MKvkX7lAbucCXS/jzDso3NZmCJDNf3X/UzxHlm3H7/BwIHxVidy96k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802971; 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=3A9e+PzqJjKvFGeLmMVDpxUP+xFG+2g7YX9PQ6bnnrI=; b=bIVldDxUlPRHlJod1hcYH12djrm6NIM8sU9bNa8WG1Yl4bMDOolVA8Tyt2lVQZgoX+QnjrEJfTYrsS92MVwTx41FT0naplsn/vnnVYEAk9VIXIokt0NkCorogdS47tm/YMKSIsOeTwtJ8UYR/W2me/0L2vZ4jErCoMyorW7nku0= 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 1629802971834965.2711159437697; Tue, 24 Aug 2021 04:02:51 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171091.312402 (Exim 4.92) (envelope-from ) id 1mIUCQ-0002fY-T7; Tue, 24 Aug 2021 11:02:34 +0000 Received: by outflank-mailman (output) from mailman id 171091.312402; Tue, 24 Aug 2021 11:02: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 1mIUCQ-0002al-Ck; Tue, 24 Aug 2021 11:02:34 +0000 Received: by outflank-mailman (input) for mailman id 171091; Tue, 24 Aug 2021 11:02:32 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU3t-0003Ux-Do for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:53:45 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 5691fed0-04c9-11ec-a8c6-12813bfff9fa; Tue, 24 Aug 2021 10:52:13 +0000 (UTC) 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: 5691fed0-04c9-11ec-a8c6-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802332; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JKae5i6vI6z84xnZFSIGHO3fodNWP34RAROxD/VJljA=; b=gu5SXIibA4VPLzV9BWYDCmDhM64u3BEQpHkPFZScFirSFm78SCtIrH/j oslytFuhHf2OnvtkDkoYFIwbHmZgTHe+7BBGSTH11PmGyLyracHHO8ZwU Fs0scFX0U7zXE5JK+L28bJoRl3u0M06HmkuEVYPKqwQmN3P1vuo9WyDD3 0=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: sBd9LM/q+xd6T31KeR1NTNpwbKnsYI8CEIgHeVqYZUvX+P4xEF0szHPATeiBiwnZDdBC6UdAqq LsNqzL7J/Zgj/Eq0DX/z+wmM9zhdnKevPqh7Q8Bx9K2AnS+UFG9WnY/B+OqQFr2wENvaGmYm9I d/b/cMi0J+v8oZxcRBxHBzowIWWLG1H5y94HAkf1k5mu9SInwVVJA6DwC7TBnc98Av+Ve77IKT WYDPu0SdRjpaDHvtfyXXDIur3rUC+2nI3pMSSuGpuYYUJ3y0MVZSIdYC3mURJLPdlRcHW6iJiQ 0T/KDwrxSHPps9A1vM1emIoW X-SBRS: 5.1 X-MesageID: 51166408 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:zHusYqHDoOblToX6pLqFVJHXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskd2ZJkh8erhBEDyewKkyXcV2/hbAV7MZniDhILFFu9fBOjZsnfd8k/Fh4lgPM 5bGsATZ+EYZmIK7voSlTPIdurIt+P3kpxA692+815dCSVRL41w5QZwDQiWVmdsQhNdOJY/HJ 2AouJaujuJYx0sH4iGL0hAe9KGi8zAlZrgbxJDLQUg8hOygTSh76O/OwSE3y0ZTyhEzd4ZgC f4ek3Cl+ueWsOAu1/hPlzontdrcRzau5l+7fm3+4kow/PX+0OVjcpaKvm/VXsO0ZmSAR4R4a LxSlEbTolOAjrqDxuIiAqo1A/63Dk07Xj+jVeenHv4uMT8ACk3EsxbmOtiA23kAmcbzaVBOZ hwrhWkXltsfGL9tTW448KNWwBhl0Kyr3ZnmekPj2ZHWY9bbLNKt4QQ8E5cDZ9FRUvBmcgaOf grCNuZ6OddcFucYXyctm5zwMa0VnB2GhudWEANtsGczjATlnFkyEkTwtAZgx47hdsAYogB4/ 6BPrVjlblIQMNTZaVhBP0ZSc/yEWDJSQKkChPmHb0mLtB0B5vpke+I3FwY3pDXRHU49upApH 2aaiIkiYcbQTOQNeSemIZM7g3ABH6gWDiF8LAv26RE X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51166408" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v7 42/51] build: grab common EFI source files in arch specific dir Date: Tue, 24 Aug 2021 11:50:29 +0100 Message-ID: <20210824105038.1257926-43-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802973815100001 Content-Type: text/plain; charset="utf-8" Rather than preparing the efi source file, we will copy them as needed from the build location. Avoid the links as they seems fragile in out-of-tree builds. Also by making a copy, we don't need to figure out the relative path or we don't need to use absolute path. Signed-off-by: Anthony PERARD --- xen/Makefile | 5 ----- xen/arch/arm/efi/Makefile | 6 ++++++ xen/arch/x86/efi/Makefile | 6 ++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 950bee10ba38..4c1dd9ce2ea1 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -425,11 +425,6 @@ $(TARGET).gz: $(TARGET) $(TARGET): tools_fixdep FORCE $(MAKE) $(build)=3Dtools $(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) $(build)=3Dinclude all $(MAKE) $(build)=3Darch/$(TARGET_ARCH) include $(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..36e15ac280cd 100644 --- a/xen/arch/arm/efi/Makefile +++ b/xen/arch/arm/efi/Makefile @@ -1,4 +1,10 @@ CFLAGS-y +=3D -fshort-wchar +CFLAGS-y +=3D -I$(srctree)/common/efi =20 obj-y +=3D boot.init.o pe.init.o ebmalloc.o runtime.o obj-$(CONFIG_ACPI) +=3D efi-dom0.init.o + +$(obj)/%.c: common/efi/%.c + $(Q)cp -f $< $@ + +.PRECIOUS: $(obj)/%.c diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile index ac815f02cb5e..da05935a9348 100644 --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -1,4 +1,5 @@ CFLAGS-y +=3D -fshort-wchar +CFLAGS-y +=3D -I$(srctree)/common/efi =20 quiet_cmd_objcopy_o_ihex =3D OBJCOPY $@ cmd_objcopy_o_ihex =3D $(OBJCOPY) -I ihex -O binary $< $@ @@ -19,3 +20,8 @@ obj-$(XEN_BUILD_EFI) :=3D $(filter-out %.init.o,$(EFIOBJ-= y)) obj-bin-$(XEN_BUILD_EFI) :=3D $(filter %.init.o,$(EFIOBJ-y)) extra-$(XEN_BUILD_EFI) +=3D buildid.o relocs-dummy.o nocov-$(XEN_BUILD_EFI) +=3D stub.o + +$(obj)/%.c: common/efi/%.c + $(Q)cp -f $< $@ + +.PRECIOUS: $(obj)/%.c --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802913; cv=none; d=zohomail.com; s=zohoarc; b=KHzYccmYcinIRfJDCbzhPIdsrJkHo+603GnrxNA7cNpPOhuyZwkRbS5dKZEwJIQ2Ll0K+UV4uHziEcOluGG7OPsiaFeCaxYKMgTVCMkwusOCc4vYAi/1jiu3MPXkLzFVPwwv2FaujpnNS8xH8/+cOJh12cepxlybip0/auUz0fI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802913; 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=yhlI28Nhg2GzG8bo6YxT07VXdiRYtQPxG7yxwZrHbqY=; b=jGIqA0m0ghW+MuQEj8fXsPedDKWLtqGt4ve0QhPX1OltamBGBuVviQXWP5A4Ly8opAjhJ4KfQljBJ8lpGlFUFG1XoKMppVEVrnWUN7PQVz+xyt53pwQYi0jIW/Bm8dpNu76g57zqv0j9h9mNsjMyQfDWfJXU1Jw/b1NVnUa1s6I= 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 16298029134670.5981764370185374; Tue, 24 Aug 2021 04:01:53 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170977.312136 (Exim 4.92) (envelope-from ) id 1mIUBR-0005QF-AC; Tue, 24 Aug 2021 11:01:33 +0000 Received: by outflank-mailman (output) from mailman id 170977.312136; Tue, 24 Aug 2021 11:01: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 1mIUBQ-0005Lm-Ne; Tue, 24 Aug 2021 11:01:32 +0000 Received: by outflank-mailman (input) for mailman id 170977; Tue, 24 Aug 2021 11:01:30 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU3y-0003Ux-Dz for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:53:50 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 58312edd-04c9-11ec-a8c6-12813bfff9fa; Tue, 24 Aug 2021 10:52:16 +0000 (UTC) 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: 58312edd-04c9-11ec-a8c6-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802336; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JD+7VO3K52HwJz8EfkgwAVmchIJrhqCdmlKnQtk1bE0=; b=EII+9uvLpfXGVicNq9z0JoHN5jV2UbmDKoS25kz5i5YFxWuneOaEIWff jm7f0icPRg+q+fQst03VM6cXYYRYf/AZ283B8kdf5EQ+/SraUQkuEakSl c+oqogak6HEifq8ecwzQrQpVSOqBrdlN3/zmhnskT5kYl9AJIKEGG0K/h o=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 7t/CwgoykC3EH/Ms9CYPanVVarqk2ub3S2sjL78gsjcXbCZTQnBvoJADlt7wG2u/yoZsxm2Dgs a/TWTiTPaWQXWe1K0C/5b1P9syRlSuSoVzxQP+MzkNvAg7gRUb2OobBrrgjpie6OUbY9SDH6QI hVqxwz6Z+1P0Xu2nJSRB7W4Ki84FS42LQPOp8eZNKyNz/ZZPidOruYETSDDiyuIhRqwjwsdbMq 9l6AAhMWsm9qHN7B4/kAArQXlELjEyb4R5kkogwiTnvylk272FOE22hsNfwGRl2iXQxejg1+7s pqTxR4SpagLwQN08/p8i97oY X-SBRS: 5.1 X-MesageID: 51540947 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:NXnpRKOKZDr4oMBcT33155DYdb4zR+YMi2TDiHoddfUFSKalfp 6V98jzjSWE7gr4WBkb+exoS5PwOE80lKQFqrX5Uo3SODUO1FHHEGgA1/qp/9SDIVyYygc178 4JH8dD4bbLfDtHZLPBkWyF+qEbsbu6Gc6T5Nv2/jNId0VHeqtg5wB2BkKwCUttXjRLApI/Cd 61+tdHjyDIQwVaUu2LQl0+G8TTrdzCk5zrJTQcAQQ81QWIhTS0rJbnDhmj2AsEWT8n+8ZszY GFqX222kyQiYD69vbu7R6R032Qoqqi9jJ3Pr3MtiHSEESotu/nXvUkZ1TIhkFMnAjm0idQrD CLmWZsAy070QKqQkil5RTqwAXuyzAo9jvrzkKZm2LqpYjjSCs9ENcpv/MuTvL10TtVgDhH6t M944tZjesnMTrQ2CDmo9TYXRBjkUS55XIkjO4IlnRaFY8TcqVYo4AT9F5cVM5oJlOz1Kk3VO 11SM3M7vdfdl2XK3jfo2l02dSpGnA+BA2PTEQOstGclzJWgHd6xU0Fw9F3pAZIyLstD51fo+ jUOKVhk79DCscQcKJmHe8EBdC6D2TcKCi8RV564W6XZp3vHki91aIfzI9FmN1CSaZ4v6fawq 6xLW+wnVRCBH7GGImU2oFX/lTXXGCwNA6duv1j2w== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51540947" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Konrad Rzeszutek Wilk" , Ross Lagerwall , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v7 43/51] build: replace $(BASEDIR) by $(objtree) Date: Tue, 24 Aug 2021 11:50:30 +0100 Message-ID: <20210824105038.1257926-44-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802920462100011 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, and $(abs_objtree) in cases where an absolute path is necessary. The "clean" target is still changing to the subdir been cleaned, to remove file in the root we need to use $(abs_objtree). Signed-off-by: Anthony PERARD --- xen/Makefile | 5 +++++ xen/Rules.mk | 2 +- xen/arch/arm/Makefile | 12 ++++++------ xen/arch/x86/Makefile | 34 +++++++++++++++++----------------- xen/common/Makefile | 2 +- xen/test/livepatch/Makefile | 12 ++++++------ xen/xsm/flask/Makefile | 2 +- 7 files changed, 37 insertions(+), 32 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 4c1dd9ce2ea1..36a64118007b 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -135,6 +135,11 @@ endif =20 export quiet Q KBUILD_VERBOSE =20 +abs_objtree :=3D $(CURDIR) +abs_srctree :=3D $(CURDIR) + +export abs_srctree abs_objtree + # 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 diff --git a/xen/Rules.mk b/xen/Rules.mk index 6877fcc2d6d8..fae6b8918019 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -8,7 +8,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 =20 diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index e6eff291c5e5..774648d6296e 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -88,21 +88,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 @@ -117,4 +117,4 @@ $(obj)/dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) .PHONY: clean clean:: rm -f $(obj)/xen.lds - rm -f $(BASEDIR)/.xen-syms.[0-9]* + rm -f $(abs_objtree)/.xen-syms.[0-9]* diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 4ea8ade7202c..85c44c69ff5a 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -92,8 +92,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 @@ ifneq ($(efi-y),) CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI endif # $(efi-y) =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) $(@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) $(@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 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 +$(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) .$(@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) .$(@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 @@ -260,7 +260,7 @@ $(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE .PHONY: clean clean:: rm -f *.lds - 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 + rm -f asm-macros.i $(abs_objtree)/arch/x86/include/asm/asm-macros.* + rm -f $(abs_objtree)/.xen-syms.[0-9]* $(abs_objtree)/.xen.elf32 + rm -f $(abs_objtree)/.xen.efi.[0-9]* efi/*.efi rm -f boot/cmdline.S boot/reloc.S boot/*.lnk boot/*.bin diff --git a/xen/common/Makefile b/xen/common/Makefile index ca839118e4d1..8771c2775efb 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 dee5fd78c188..008e89fc9a47 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)") > $@ diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 8d18c7d4ae6f..bff36aa97918 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 $(BASEDIR)/$(obj) +FLASK_BUILD_DIR :=3D $(abs_objtree)/$(obj) POLICY_SRC :=3D $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) =20 $(obj)/policy.bin: FORCE --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802886; cv=none; d=zohomail.com; s=zohoarc; b=DvAkc8LORHDlQUrYow8UWB4ZVQ9iFyoZEBkEQlsVPnrnbtb3oS+ziNl+gXt2wQ7aGqUYyFAn03sMcmtfthgmwoJH4OXNwshjSqFM6+9fpqeopC630hLUra3NMR5CzfXOR+ni6TnEl1CfTBJvgUmalzDKriDv2Un6OeN0pmdGqhM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802886; 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=1YraT+VplFMrhWxrWnbE9P430Qk59RkEwgYtZl0J7e0=; b=SwJxpT+4pt3GHkL/LxZokoYmYejV0I6BufH3ASdHQmR2YYTanTVTOAbux4xfrX2fgwRnOekLMHoihkRk2iogpnkaqiuycoyGb+E3gJdbWlMiuuPpUmMn0UyeYYBSzDD6tquLCY3c4gWYHKAoMGzpAv8Qp2f9vNJmiItC0DVlM20= 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 1629802886488921.8841229601372; Tue, 24 Aug 2021 04:01:26 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170960.312075 (Exim 4.92) (envelope-from ) id 1mIUB3-0003GS-FC; Tue, 24 Aug 2021 11:01:09 +0000 Received: by outflank-mailman (output) from mailman id 170960.312075; Tue, 24 Aug 2021 11:01:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUB3-0003GH-Bs; Tue, 24 Aug 2021 11:01:09 +0000 Received: by outflank-mailman (input) for mailman id 170960; Tue, 24 Aug 2021 11:01:08 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU4S-0001EC-F1 for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:54:20 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8e617b9b-5a5e-4494-8b72-22f8ebac187a; Tue, 24 Aug 2021 10:52:19 +0000 (UTC) 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: 8e617b9b-5a5e-4494-8b72-22f8ebac187a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802339; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Egvo0J+VmflXfAlaJgCtB/ylgXyk2Ou1lKw+xDQ2zOE=; b=CnLfuk9U2LaijG36A7donSzpU+9S4coJpYh6wmEaDmtjprHtheT8Pak9 4JmrKEkkNhknilAbvKic0MEgshJAIUDZgzbk/RlYItAPFn9uU3U0j6PuL FMAciOArGPjaK7jeAc7ABhGkYSBcH1AeikyMFspg+yHWCDAJpL2DtlMCC Y=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: MrliczgKjkZzflRwdjnCOG5/Va3dupq6Bhxuiu6S5anisuXDaTyeSkrI2Z4YI3y+DaeOals0fR me7Me/eRTASKPtaeFwQNCN0lQSyK9ZmrOYXNJQqeaUDDfU5cWmGtAObdohMN0c4kIeBx/czBy+ QSdvarpCoLWMPMErAlydFbxLzGJwsa2ISNtmO1dUEfwIkY65vXELSJprWs479LGI/E3QhjC2Co UCYHLPJClaCBLivQ1FFbsLZdDnO5sFHHBt1lfxaUqVGLikv7CVlCo5qoMeXhW+XttGLSKpNP1V KBFkZbDZz3+7ssJDHfmfWxkQ X-SBRS: 5.1 X-MesageID: 51130801 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:+pO/KaABhTwsDlLlHegQsceALOsnbusQ8zAXPh9KJCC9I/bzqy nxpp8mPEfP+VAssHFJo7C90dq7MArhHP9OkMIs1NiZLW3bUQeTQr2KjrGSiQEIeReOkdK1vJ 0IG8QQNDSaNykYsS+O2njcLz9W+qjkzEnHv4bj5kYoaTsvR7Br7g9/BAreOFZxXhN6CZ0wE4 fZztZbphK7EE5nIviTNz0gZazuttfLnJXpbVotHBg88jSDijuu9frTDwWY5BEDSDlCqI1Svl Qt0jaJqJlLgcvLiiM05FWjrKi+X+GRiOerMfb8y/T97A+czzpAKr4RH4Fq9wpF2N1HoGxa6+ Uk5S1QcvibokmhBF2dsF/j3RLt3y0p7GKnwViEgWH7qci8Xz4iDdFd7LgpBCcxxnBQyO2U6p g7qF5xdqAnfC/ojWD4/ZzFRhtqnk27rT4rlvMSlWVWVc8bZKVKpYIS8UtJGNNYdRiKoLwPAa 1rFoXR9fxWeVSVYzTQuXRu2sWlWjA2Eg2dSkYPt8SJ23xdnWx/zUEf2MsD901wva4VWt1B/a DJI65onLZBQosfar98Hv4IRY+tBmnEUXv3QRevyJTcZdM60lf22uDKCZkOlZ2Xka0zvegPcc 76IS5lXEYJCj3TINzLx5tW7xyIW3m5UV3Wu7Fj26Q= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51130801" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v7 44/51] build: add $(srctree) in few key places Date: Tue, 24 Aug 2021 11:50:31 +0100 Message-ID: <20210824105038.1257926-45-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802897846100002 Content-Type: text/plain; charset="utf-8" This adds $(srctree) to a few path where make's VPATH=3D$(srctree) won't apply. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/arch/x86/arch.mk | 2 +- xen/build.mk | 4 ++-- xen/include/Makefile | 4 ++-- xen/xsm/flask/Makefile | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 53b48ded28de..f0dc6820f85c 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 537c32f42d25..0f9d718709b7 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -25,9 +25,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/include/Makefile b/xen/include/Makefile index 341196306abd..0b72c129da69 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -51,7 +51,7 @@ $(obj)/compat/%.i: $(obj)/compat/%.c $(src)/Makefile =20 $(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 $(src)/xlat.lst <$< >$@= .new + $(PYTHON) $(BASEDIR)/tools/compat-build-source.py $(srctree)/$(src)/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 @@ -67,7 +67,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' $(srctree)/$(src)/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/xsm/flask/Makefile b/xen/xsm/flask/Makefile index bff36aa97918..56aed07e27fe 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 $(srctree)/$(src)/policy/,security_classes= initial_sids) +AV_H_DEPEND =3D $(srctree)/$(src)/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 $(srctree)/$(src)/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 $(srctree)/$(src)/policy/mkaccess_vector.sh quiet_cmd_mkaccess =3D MKACCESS VECTOR $@ cmd_mkaccess =3D $(SHELL) $(mkaccess) $(AWK) $(obj)/include $(AV_H_DEPEND) =20 --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802927; cv=none; d=zohomail.com; s=zohoarc; b=bljIlJGVXQ8cHYlB5LV5XwNtiHHPqFey28zIYqblEWnn2aPUl5E3ceY2Ptw2oLcHl87Z3IIq9TJGYVAunT9wgQNnB9frEJMji35Oo6adrp6J2nByCT+AwqmW5ipNMUy5RDEzPBKTSR4DRigbQzLAE7rhf5mxAGZYlTGPkSPJJ5Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802927; 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=3aUiLT9hwBBQSGwnfHRqCRoxm7J+1IEPkRqzjZaKoTE=; b=kbp7mithVARrQiG1Bxr2Yf7t9lLcw9X9Dl9+TC1ibxxoZf7m5TJiFP8v27msDFJzb1q02YYIimFCEsUG8XuJUIBk6fyVHQhx7oJLbdEJti3Zun8ONloJHm4Ha8ssM5z67Up8ZLMvvWY47rZWIYVeB7zd6kcGjYi0UuzsrvvQfNI= 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 1629802927864180.94295768142263; Tue, 24 Aug 2021 04:02:07 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170991.312196 (Exim 4.92) (envelope-from ) id 1mIUBa-0007ol-SB; Tue, 24 Aug 2021 11:01:42 +0000 Received: by outflank-mailman (output) from mailman id 170991.312196; Tue, 24 Aug 2021 11:01: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 1mIUBa-0007o7-J5; Tue, 24 Aug 2021 11:01:42 +0000 Received: by outflank-mailman (input) for mailman id 170991; Tue, 24 Aug 2021 11:01:40 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU4X-0001EC-F8 for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:54:25 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b4d2f649-f41e-4578-908e-2618cdba78ae; Tue, 24 Aug 2021 10:52:20 +0000 (UTC) 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: b4d2f649-f41e-4578-908e-2618cdba78ae DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802340; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FDnqHMoR0cH4CGhhkHf9+wr9hwq4IdoBCZrIirFvi5I=; b=W0x7J9SkHZWsKgTk3bS5eDzQs9sGJaAMc3iL/yOyZspWlK5t1X8apZBn unLtOF9YfrfLgiycGm5rIQMic2H60CfSozaxz7EY1Vt4oBGzy2DxPq89S x8ZiitSOMi9+D0iyImLFbzFDhXoadjVqQZWZyOshFmtu0zQSAfZ+jTXLN c=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: Ubg3qgVyfvbrTwyewNxqT5RGvwVUhQ2qV4dJWl/Nl5iTvb9pIMdQIJtrQXJZp51z3g4ThjDVL1 OR70pnT0QUZs6EqIq/km1xyqD6emaboy9jQaZCaaaO36qX9RlSMYLi39c0aQJ5WHV1cL3hcGxe altK5+1Pv5WfioqPTvVe5nUVr6tLC3azohMGif8p3bLgO5Fxaoq4Z7Q24kjSESatBCi4vBI2bV VrO5jxU6vvJ5pDkr5ccm4BiVEthMH6S6JSltusS62EDW3IwslkdqPNQCoSLjZYz3VdrPanBDVA ahZwzoYtVsmMVnO7fh8U0jD+ X-SBRS: 5.1 X-MesageID: 51166413 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:SaWcj6NZFIw1HsBcT33155DYdb4zR+YMi2TDiHoddfUFSKalfp 6V98jzjSWE7gr4WBkb+exoS5PwOE80lKQFqrX5Uo3SODUO1FHHEGgA1/qp/9SDIVyYygc178 4JH8dD4bbLfDtHZLPBkWyF+qEbsbu6Gc6T5Nv2/jNId0VHeqtg5wB2BkKwCUttXjRLApI/Cd 61+tdHjyDIQwVaUu2LQl0+G8TTrdzCk5zrJTQcAQQ81QWIhTS0rJbnDhmj2AsEWT8n+8ZszY GFqX222kyQiYD69vbu7R6R032Qoqqi9jJ3Pr3MtiHSEESotu/nXvUkZ1TIhkFMnAjm0idQrD CLmWZsAy070QKqQkil5RTqwAXuyzAo9jvrzkKZm2LqpYjjSCs9ENcpv/MuTvL10TtVgDhH6t M944tZjesnMTrQ2CDmo9TYXRBjkUS55XIkjO4IlnRaFY8TcqVYo4AT9F5cVM5oJlOz1Kk3VO 11SM3M7vdfdl2XK3jfo2l02dSpGnA+BA2PTEQOstGclzJWgHd6xU0Fw9F3pAZIyLstD51fo+ jUOKVhk79DCscQcKJmHe8EBdC6D2TcKCi8RV564W6XZp3vHki91aIfzI9FmN1CSaZ4v6fawq 6xLW+wnVRCBH7GGImU2oFX/lTXXGCwNA6duv1j2w== X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51166413" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 45/51] build: rework cloc recipe Date: Tue, 24 Aug 2021 11:50:32 +0100 Message-ID: <20210824105038.1257926-46-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802932158100005 Content-Type: text/plain; charset="utf-8" After folowing patches, the recipe doesn't work anymore. - build: build everything from the root dir, use obj=3D$subdir - build: introduce if_changed_deps First patch mean that $(names) already have $(path), and the second one, the .*.d files are replaced by .*.cmd files which are much simpler to parse here. Also replace the makefile programming by a much simpler shell command. This doesn't check anymore if the source file exist, but that can be fixed by running `make clean`, and probably doesn't impact the calculation. `cloc` just complain that some files don't exist. Signed-off-by: Anthony PERARD --- xen/Makefile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 36a64118007b..b09584e33f9c 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -490,14 +490,7 @@ _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.cmd' -exec awk '/^source_/{print $$3;}' {} + | cloc --l= ist-file=3D- =20 endif #config-build =20 --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802932; cv=none; d=zohomail.com; s=zohoarc; b=ioZm7N0JysG9xXjwBYFnaVvHjUFzZn8Sjl+TYrwBGKnWP+2TxJ3APp529gyDxuK0OVBvrcJVkRZTpJIcBjC8y04zLjVaFhZFuSJ59ZF1yPllUt8z7eTb+i0VeUsjkzXCjfZgtccispH5lKDE9t3YifOy8Li3RGOKu8Xn0L5bHH8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802932; 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=AH2mcnlxScHvLcQM5YH/MuhzGWrV0S5WrKdxw5PVXa4=; b=e67HkJPXFKJnABiB9G8FfgF9uOZ52DlKo57P04gabTaxIeH2kxTAwF5omQawhu9NAXO5ErCnDly+pR/EzFj3QHpYbKSHPVgsy4U6NPGKydX00MrvKFhTlkPH5ZsYwMMj7pomHQQ7gOq0op346o6yMAOA48IojhCjfTBEiBbyImo= 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 1629802932151735.4827900281826; Tue, 24 Aug 2021 04:02:12 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171000.312221 (Exim 4.92) (envelope-from ) id 1mIUBg-0000Me-Pm; Tue, 24 Aug 2021 11:01:48 +0000 Received: by outflank-mailman (output) from mailman id 171000.312221; Tue, 24 Aug 2021 11:01:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUBf-0000Dz-Ia; Tue, 24 Aug 2021 11:01:47 +0000 Received: by outflank-mailman (input) for mailman id 171000; Tue, 24 Aug 2021 11:01:43 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU43-0003Ux-E1 for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:53:55 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 5c0972c7-04c9-11ec-a8c6-12813bfff9fa; Tue, 24 Aug 2021 10:52:23 +0000 (UTC) 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: 5c0972c7-04c9-11ec-a8c6-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802342; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=35aTLDDxJLidrizomT+8cU8VdN54jKZMaixNrR0BilA=; b=bcOlprwX/+bomvWWpVtzpwEjB6ZFvTAytKmxSkUoZLDq8cftc+oQ5krN Ng3enpdh0eh58f7bZ6nT3RfJT2T0T8mO2iJMO+FkB93QCI/wJOcyIYhUl Igm2EkZ0zuwibDLGFyScBoXTxoVZoK7EcaZIgJcviLtJRTpziaheuWkhy w=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: tPFce8HdmO6qKBEqtVkwgUYZlALVUviKlNGnsdtp/AGozADmlySbsidoGKL24REOEHkalwmqub 0iLr3gRol7BGsPBCP/2cDK3ARR5/F4HRKpoKbECCEMCIcQVm7UHu03iDs1Bb9xJ7fJcZNDKQUa k3O/eyL9Qu/CkVaVJRiZbJ2dphgZA4v+MAFFd4JJ76OHqQqBMhu2mXP6AUvmu8pDIUsSD8QXD2 Hvde1BF2rnAUZ154LhzlnfPVmFa0a3+V5zWok1WsMpvJU9lslmnMUFXT45jIA9Kh8sunsCBjGa +QIiu+ueXYl1WaDob/8mRYkW X-SBRS: 5.1 X-MesageID: 51540950 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:qoWxp6vS2Oi/ebFh6g/r4ksZ7skCyoMji2hC6mlwRA09TyXGra 2TdaUgvyMc1gx7ZJh5o6HnBEGBKUm9yXcH2/hpAV7CZnishILGFvAH0WKP+VPd8k7Fh6RgPM VbAs9D4bTLZDAX4voSizPIcOrIteP3lZxA8t2urUuFIzsKV4hQqyNCTiqLGEx/QwdLQbAjEo CH28ZBrz28PVwKc8WSHBA+LqT+juyOsKijTQ8NBhYh5gXLpyiv8qTGHx+R2Qpbey9TwI0l7X POn2XCl+qeWrCAu1HhPl3ontRrcejau5h+7Qu3+4oowwDX+0eVjUJaKvi/VX4O0aWSAR0R4a HxSl8bTr9OAjXqDyyISFLWqnPd+Sdr5Hn4xVCCh3z/5cT/WTIhEsJEwZlUax3D9iMbzadBOY 9wrhakXqBsfGT9deXGlqn1fgAvklDxrWspkOYVgXAaWYwCaKVJpYha+E9OCp8PEC/z9YhiSY BVfYnhzecTdUnfY2HSv2FpztDpVnMvHg2eSkxHvsCOyTBZkH1w0kNdzs0CmXUL8o47VvB/lq 35G7UtkKsLQt4dbKp7CutEScyrCnbVSRaJK26WKUSPLtBzB5sMke+E3FwR3pDVRHUl9upPpH 3xaiIqiYdpQTOSNSSn5uw1zjndBH66QSngjtpD4pQRgMyNeIbW X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51540950" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v7 46/51] build: replace $(BASEDIR) by $(srctree) Date: Tue, 24 Aug 2021 11:50:33 +0100 Message-ID: <20210824105038.1257926-47-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802936016100003 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). "clean" is still changing directory, so we need to use absolute path for it. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/Kconfig | 4 ++-- xen/Makefile | 7 +++---- xen/Rules.mk | 6 +++--- xen/common/Makefile | 2 +- xen/common/libfdt/Makefile | 2 +- xen/include/Makefile | 12 ++++++------ xen/scripts/Kbuild.include | 4 ++-- xen/scripts/Kconfig.include | 2 +- xen/scripts/Makefile.clean | 2 +- xen/xsm/flask/Makefile | 2 +- 10 files changed, 21 insertions(+), 22 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 b09584e33f9c..1a288b87980a 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -17,8 +17,7 @@ export XEN_BUILD_HOST ?=3D $(shell hostname) PYTHON_INTERPRETER :=3D $(word 1,$(shell which python3 python python2 2>/d= ev/null) python) export PYTHON ?=3D $(PYTHON_INTERPRETER) =20 -export BASEDIR :=3D $(CURDIR) -export XEN_ROOT :=3D $(BASEDIR)/.. +export XEN_ROOT :=3D $(CURDIR)/.. =20 srctree :=3D . objtree :=3D . @@ -183,7 +182,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 @@ -311,7 +310,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 fae6b8918019..cb8b35ceb596 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -15,7 +15,7 @@ include $(XEN_ROOT)/Config.mk # Don't try to remake this file included by Config.mk. $(XEN_ROOT)/.config: ; =20 -include $(BASEDIR)/scripts/Kbuild.include +include $(srctree)/scripts/Kbuild.include =20 ifndef obj $(warning kbuild: Rules.mk is included improperly) @@ -63,7 +63,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 @@ -182,7 +182,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/common/Makefile b/xen/common/Makefile index 8771c2775efb..db78b06f4a50 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 0b72c129da69..f5241b70e7fa 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -42,22 +42,22 @@ endif .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 $(srctree)/$(src)/xlat.= lst <$< >$@.new + $(PYTHON) $(srctree)/tools/compat-build-source.py $(srctree)/$(src)/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 diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 3e436639da1c..81abe4b4aa55 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -93,12 +93,12 @@ cc-ifversion =3D $(shell [ $(CONFIG_GCC_VERSION)0 $(1) = $(2)000 ] && echo $(3) || e # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=3D # Usage: # $(Q)$(MAKE) $(build)=3Ddir -build :=3D -f $(BASEDIR)/Rules.mk obj +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 +clean :=3D -f $(abs_srctree)/scripts/Makefile.clean clean -C =20 # echo command. # Short version is used, if $(quiet) equals `quiet_', otherwise full one. 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 c2689d4af5fa..db1d1f918d42 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -8,7 +8,7 @@ src :=3D $(obj) =20 clean:: =20 -include $(BASEDIR)/scripts/Kbuild.include +include $(abs_srctree)/scripts/Kbuild.include =20 include $(src)/Makefile =20 diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 56aed07e27fe..1da6de2867ae 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -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 Sun May 5 07:12:38 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=1629802931; cv=none; d=zohomail.com; s=zohoarc; b=a+8NkWUyny+buggo/2zpn+dVFq2MeKDgDGjy55+8JF5ZWj7oQ9dBJhF5Tq3SaWqPeAvTcys8KSDAbkXyc4BgD/3dzOF9uL2ORXFTEDodHol/UDclSZmzwi2h2bPSuAkmQjRpjNH/qpv+pMbhl6C5H7hvcJwV047S6b1s37E+FFg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802931; 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=yxLxCpQyZKNGJE2XxUNo9VUc0BbFjSUczJ7UCfLd5TM=; b=GS5k0LxlyCjO7xI7cr4hltao2UfZ7j4J70ye4Pv3iWTbBGhNohDAIV1RcareIMq7AcOd4BS5UrlJXjdXeVmW7Xm79vD2abt+CVZIycsLEo0oBHO6gDWrFZWE7OmgDPos2JN9QwEu3R+bXch800CJ5YSNzw51X/D4uFOvIYkgnHs= 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 16298029318711002.4145405137889; Tue, 24 Aug 2021 04:02:11 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171002.312238 (Exim 4.92) (envelope-from ) id 1mIUBk-0000zl-PQ; Tue, 24 Aug 2021 11:01:52 +0000 Received: by outflank-mailman (output) from mailman id 171002.312238; Tue, 24 Aug 2021 11:01: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 1mIUBi-0000tG-Os; Tue, 24 Aug 2021 11:01:50 +0000 Received: by outflank-mailman (input) for mailman id 171002; Tue, 24 Aug 2021 11:01:45 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU48-0003Ux-EL for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:54:00 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 5edca810-04c9-11ec-a8c6-12813bfff9fa; Tue, 24 Aug 2021 10:52:27 +0000 (UTC) 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: 5edca810-04c9-11ec-a8c6-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802347; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=I9w9cGZo+/VGBhzaJdsY6/R/D9f03RAWtGSiZGJZmx8=; b=Xb4UFhNgdPB8bBedrWuHMOEsPV6Wq7gU4/5tgu8KRFBYmqXI0pjPuo9a VbArppdpKA670v/grMABPRiKBDzThNnoDwaVXjAZxNh+P6Lrl2V+tDNwR wgPURRq1g/UA3Kl5ksN6Af/5ELAUOV2csfWlBUkTQvgRvxS/ohT/nUwvo w=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: gNeFafWRySL8KG/VGtvOqXK9CUK0WgOuppa6GdQ1/USxqAYBskm0qioZ2WUXhL1OcoIl5qN4Pi 4lUzC2otoIqEYdxstol68v1T36QGPV+Hol974D4YZnLT9GJ7NIIhH3vrGEh4C75ut5GOc47tsk TkwdRXjQVAhVOUQwUiYlfGX2mIbZSxuXprckzstzsJXnljBYdVhrDcc8F7kwVLS89T2A3zZQkV WP9AgMThlb6dvoEngd/IRsuVj6/zvXG3AEC4SPwhqIjdb2CiLZuk8vbnundq1MUauC5XwSj42x YNot8sqnQ53tThpyqApNz/+R X-SBRS: 5.1 X-MesageID: 51153607 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:xGCWeqFsem6QoPbOpLqFVJHXdLJyesId70hD6qkvc3Fom52j/f xGws5x6fatskd2ZJkh8erhBEDyewKkyXcV2/hbAV7MZniDhILFFu9fBOjZsnfd8k/Fh4lgPM 5bGsATZ+EYZmIK7voSlTPIdurIt+P3kpxA692+815dCSVRL41w5QZwDQiWVmdsQhNdOJY/HJ 2AouJaujuJYx0sH4iGL0hAe9KGi8zAlZrgbxJDLQUg8hOygTSh76O/OwSE3y0ZTyhEzd4ZgC f4ek3Cl+ueWsOAu1/hPlzontdrcRzau5l+7fm3+4kow/PX+0OVjcpaKvm/VXsO0ZmSAR4R4a LxSlEbTolOAjrqDxuIiAqo1A/63Dk07Xj+jVeenHv4uMT8ACk3EsxbmOtiA23kAmcbzaVBOZ hwrhWkXltsfGL9tTW448KNWwBhl0Kyr3ZnmekPj2ZHWY9bbLNKt4QQ8E5cDZ9FRUvBmcgaOf grCNuZ6OddcFucYXyctm5zwMa0VnB2GhudWEANtsGczjATlnFkyEkTwtAZgx47hdsAYogB4/ 6BPrVjlblIQMNTZaVhBP0ZSc/yEWDJSQKkChPmHb0mLtB0B5vpke+I3FwY3pDXRHU49upApH 2aaiIkiYcbQTOQNeSemIZM7g3ABH6gWDiF8LAv26RE X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51153607" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Konrad Rzeszutek Wilk" , Ross Lagerwall , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v7 47/51] build: Rework "clean" to clean from the root dir Date: Tue, 24 Aug 2021 11:50:34 +0100 Message-ID: <20210824105038.1257926-48-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802935218100001 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 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 --- xen/Makefile | 24 ++++++++++++------------ xen/arch/arm/Makefile | 5 +---- xen/arch/x86/Makefile | 18 ++++++++++-------- xen/arch/x86/boot/Makefile | 2 ++ xen/common/Makefile | 3 +-- xen/include/Makefile | 4 +--- xen/scripts/Kbuild.include | 2 +- xen/scripts/Makefile.clean | 14 +++++++++++--- xen/test/livepatch/Makefile | 4 +--- xen/xsm/flask/Makefile | 4 +--- 10 files changed, 41 insertions(+), 39 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 1a288b87980a..67ced3e92689 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -398,18 +398,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 774648d6296e..3a69b5ef6cc3 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -114,7 +114,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 $(abs_objtree)/.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 85c44c69ff5a..25bf3cc2ac9a 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -78,6 +78,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 @@ -197,8 +200,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: $(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)" @@ -257,10 +260,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 -.PHONY: clean -clean:: - rm -f *.lds - rm -f asm-macros.i $(abs_objtree)/arch/x86/include/asm/asm-macros.* - rm -f $(abs_objtree)/.xen-syms.[0-9]* $(abs_objtree)/.xen.elf32 - rm -f $(abs_objtree)/.xen.efi.[0-9]* efi/*.efi - rm -f boot/cmdline.S boot/reloc.S boot/*.lnk boot/*.bin +clean-files :=3D \ + include/asm/asm-macros.* \ + $(objtree)/.xen-syms.[0-9]* \ + $(objtree)/.xen.elf32 \ + $(objtree)/.xen.efi.[0-9]* \ + efi/*.efi diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 3580a9b656e8..c2385e69332d 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -49,3 +49,5 @@ $(head-objs): %.S: %.bin =20 %.lnk: %.o $(src)/build32.lds $(LD) $(LDFLAGS_DIRECT) -N -T $(filter %.lds,$^) -o $@ $< + +clean-files :=3D cmdline.S reloc.S *.lnk *.bin diff --git a/xen/common/Makefile b/xen/common/Makefile index db78b06f4a50..9208d233642a 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -84,5 +84,4 @@ $(obj)/config_data.S: $(srctree)/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_data.S config.gz diff --git a/xen/include/Makefile b/xen/include/Makefile index f5241b70e7fa..c3172f6636be 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -128,6 +128,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 81abe4b4aa55..862b2a49c5ac 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -98,7 +98,7 @@ build :=3D -f $(srctree)/Rules.mk obj # Shorthand for $(MAKE) clean # Usage: # $(MAKE) $(clean) dir -clean :=3D -f $(abs_srctree)/scripts/Makefile.clean clean -C +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 db1d1f918d42..fa3fee758348 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-) \ $(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 008e89fc9a47..5807a559b42a 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 1da6de2867ae..d655cf8d1974 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -47,6 +47,4 @@ $(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) 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) flask-policy.S --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802964; cv=none; d=zohomail.com; s=zohoarc; b=KQ3gN6AbTOEKc1fsD2VZExaWEdIgwHIQeRKunTx160eSuljV6k/EHJcI9LzWtE+9Zl6c9jRdz+lAcqKCRd51NM6iImoxbTmz8CseEK/f+9Thg6lj9TdlQ7e2NxEyiiEvE8XpPSVM1ntEXepNxJ2vJ+m40g2JHGgImcIChor169Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802964; 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=4JJh9Iv5cE+GyFPtYh5zQ5PFPfUv8xG3xGLnYDCETuY=; b=TfA+iHQ3pFy4DfyY9qzFdNMSoeJ4nL/PTVkTXmK4KEJCZb4DE8tq/yV7mHmSj13IYYOtPGaF2zd0Fm7NerussSX+jdTAW2I1vIzgyccIn2kCPI+ABRD3F/gr4vvTd5ho1jZiR63CO4FysQtKfnSsPf27jDyEoP27QALzU6ue5wo= 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 1629802964949623.6556730413452; Tue, 24 Aug 2021 04:02:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171076.312372 (Exim 4.92) (envelope-from ) id 1mIUCI-00013w-Tp; Tue, 24 Aug 2021 11:02:26 +0000 Received: by outflank-mailman (output) from mailman id 171076.312372; Tue, 24 Aug 2021 11:02:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIUCI-00013g-PU; Tue, 24 Aug 2021 11:02:26 +0000 Received: by outflank-mailman (input) for mailman id 171076; Tue, 24 Aug 2021 11:02:25 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU4c-0001EC-FE for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:54:30 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 7ab1cb7c-51bc-48ca-a536-68a6494dc77a; Tue, 24 Aug 2021 10:52:28 +0000 (UTC) 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: 7ab1cb7c-51bc-48ca-a536-68a6494dc77a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802347; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QuqoIfeDw8eF+DGgSYO4xUOtOIqvl/XeL88YQx7aEos=; b=S4V6X66ZAg8Jn0XYmLQeVsIDGVXLCm45J9GTtuwJNE7QSgQm3aY0EYHO N7UI9mGpbSrgaDDQ4x8jK6OkC1X1C20OvnlcBw1Le8YhOYkhJMn1KbXrr 9rFnun0+cuM1rDmKKFkxG0+80lmMRM57DMI19vk9M1+w9jCAk/rp8XQSh 0=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: vYYem8iODwV1MlhRS+TqWRAqy7e5fGxR41KiW/A6v4dHTHPmI7SD8+APb7NnHFGdhoek1K0fEF Vu4Q3Kf739eG61IZ1r/sYCvW3TmO0NXdgy/qnM/P6VNV8AnJshCTJGgeoZcHTcGj1h6a5aTqv2 hAwNu95mBU488IIdQHP8MWVB4rQmuyikb0wyj1TfHBqAZKZ2m0p8YvPm21oKx36p9qEosX9iUS WadE4v6unyh0O8vr9src63Ipfz6HD3YfQfXiwCXTvVT2Gq+BpB51T/QnLrTf/7uzYppIAMqbOT Vtk992vpXswjk5JH3JQMIYvI X-SBRS: 5.1 X-MesageID: 52875527 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:+8AyFKAxgx6APQrlHelW55DYdb4zR+YMi2TDt3oddfWaSKylfq GV7ZAmPHrP4gr5N0tOpTntAse9qBDnhPtICOsqTNSftWDd0QPFEGgL1+DfKlbbak/DH4BmtJ uJc8JFeaDN5VoRt7eH3OFveexQv+Vu88qT9JnjJ28Gd3AMV0n5hT0JcTpyFCdNNW97LKt8Lr WwzOxdqQGtfHwGB/7LfEXsD4D41qT2fIuNW29/OyIa X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="52875527" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 48/51] build: Rework "headers*.chk" prerequisite in include/ Date: Tue, 24 Aug 2021 11:50:35 +0100 Message-ID: <20210824105038.1257926-49-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802967194100001 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. 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 --- xen/include/Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index c3172f6636be..4e64a31ecab3 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -78,10 +78,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)) +hdrs-path :=3D $(srctree)/$(src)/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)) +list-headers =3D $(wildcard $1/*.h $1/*/*.h) +filter-headers =3D $(filter-out $(addprefix $(hdrs-path)/,$($1-filter)), $= ($1)) + +c99-headers :=3D io/9pfs.h io/pvcalls.h +public-headers :=3D $(call list-headers,$(hdrs-path)) +ansi-headers :=3D $(public-headers) + +public-headers-filter :=3D dom0_ops.h arch-% +ansi-headers-filter :=3D %ctl.h xsm/% %hvm/save.h $(public-headers-filter)= $(c99-headers) + +PUBLIC_HEADERS :=3D $(call filter-headers,public-headers) +PUBLIC_ANSI_HEADERS :=3D $(call filter-headers,ansi-headers) +PUBLIC_C99_HEADERS :=3D $(addprefix $(hdrs-path)/, $(c99-headers)) =20 $(src)/public/io/9pfs.h-prereq :=3D string $(src)/public/io/pvcalls.h-prereq :=3D string --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802912; cv=none; d=zohomail.com; s=zohoarc; b=FsK1rTpK1GbKb/5wghTlMPyFEcqWlZcGl82zv7JAjMuMi0pXdOZL5jvNMQ0badPO68emcx3kYjnBq2YDrOJtk5J7iFqZVwLhbQA3hgVxTyc9uvxMaGOdeeB7j37dUDBL17KSt/L0NI1ln9un8kAv+cGrVzG174751W6ir9V8EC0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802912; 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=+VkhGfjMzIzq+BN5dD60iDk/oBDd5aTDEiz5JeYvToE=; b=BFI8JZPOlLZP+OX/uQQWXf0q3uZkt2bQgEncNMLn9uwTVahovOZKjzhtasVT+2RE4SNS0meN+LQB0BRqyTsf93O1RKXPEn1waEKSPFmVH5PUX3nMcavIj7ce4bGhl/eil7C3KC6w7vYuMQ7tmuq0+zf3Mn1XDPMrGgEF/hDHt88= 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 1629802912219791.8802905183325; Tue, 24 Aug 2021 04:01:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170972.312119 (Exim 4.92) (envelope-from ) id 1mIUBP-00054m-9M; Tue, 24 Aug 2021 11:01:31 +0000 Received: by outflank-mailman (output) from mailman id 170972.312119; Tue, 24 Aug 2021 11:01: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 1mIUBP-000543-3t; Tue, 24 Aug 2021 11:01:31 +0000 Received: by outflank-mailman (input) for mailman id 170972; Tue, 24 Aug 2021 11:01:30 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU4D-0003Ux-ER for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:54:05 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 61415b14-04c9-11ec-a8c6-12813bfff9fa; Tue, 24 Aug 2021 10:52:31 +0000 (UTC) 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: 61415b14-04c9-11ec-a8c6-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802351; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qIhqeksXTsJld6lhwEnOa5nx/YE0BWnrn6VUwRvVnk4=; b=ZjW+KAJIsmAOAxLmt0dtP4h/vj0SuNM4Hf7gsC8Y3uXRXxYZFIru1glF pA8sG2b81dsbNAhF8AeIZrj9spF4Zs6AbzMnEKAdewcIeHNKJIzL8BCTd p9TRnfHUeuVT9aNyoVfkF44UaE5K0Bz81JSkjliahAVNq8OrrzTNGE5HS M=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: fHKQ0ZvUS7+lvVLYCyJjtkAi7/fyG2TviMf6NFjK1fY3NxLxTYJ9vOMsccwVlqKUYR95fSAt/h u2sKMJjEM7m3wSxrRKfJB/Frc/Y3tKV4+UCRkeTTbHxOh1Ppl2cSk5JBuQBSIiyOmSM5i9uIdy PBuO7ZRS0UzZRbXUNNtGZD5YbHJZ+p4mQh7fJ53ndDADfeUKMkoHFVwFwhiJbPh7s8iU6xKi3m CSgDeAvSYOHDhpJ9B4JX2vh/hVYnyWHq6i6q1Wng6mVoJyLaptAGUbh8k8W44mu5oXadkuyujm K2RZsu/NdXoZzqfgEqHjGiIu X-SBRS: 5.1 X-MesageID: 51130805 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:KQ+fb68kV0JJoj8PmLZuk+Fkdb1zdoMgy1knxilNoENuH/Bwxv rFoB1E73TJYW4qKRcdcdDpAsm9qADnhOdICOgqTPyftWbdyQ+Vxe1Zg7cKoAeQUREWlNQtsp uIGpIWYLGeMbEQt7eY3ODMKadE/DDxytHLuQ6x9RZQZDAvT5slwxZyCw6dHEEzbhJBH4AFGJ 2V4dcCjya8eFwMB/7LSkUtbqzmnZnmhZjmaRkJC1oM8w+Vlw6l77b8DlyxwgoeaTVS2r0vmF K13DARp5/T/c1T+CWsl1M73K4m2+cJDeEzRvBkv/JlawkETDzYIbiJFYfy+Azd69vfkGrC2O O82CvIef4Dpk85N1vF2yfFyk3u1i0j5GTlzkLdiXz/odbhTDZ/EMZZg5lFGyGpnXbIkesMpJ 6j5VjpwKa/zCmw7RjV9pzNTVVnh0C0qX0tnaoaiGFeS5IXbPtUoZYE9E1YHZ8cFGaigbpXWN VGHYXZ/rJbYFmaZ3fWsi1mx8GtRG06GlODTlIZssKY3jBKlDRyzlcexsYYgnAcnahNAqVs9q DBKOBlhbtORsgZYeZ0A/oAW9K+DijXTRfFIAupUCHa/WE8SgDwQrvMkcsIDc2RCeA1JaoJ6e f8uQljxBMPkmrVeLKz9YwO6RbQXWn4RijpxqhlluhEhoE= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51130805" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Konrad Rzeszutek Wilk" , Ross Lagerwall , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v7 49/51] build: adding out-of-tree support to the xen build Date: Tue, 24 Aug 2021 11:50:36 +0100 Message-ID: <20210824105038.1257926-50-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802919450100009 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 --- xen/Makefile | 173 +++++++++++++++++++++++++++++------- xen/Rules.mk | 11 ++- xen/arch/arm/efi/Makefile | 3 + xen/arch/x86/arch.mk | 3 + xen/arch/x86/boot/Makefile | 5 +- xen/arch/x86/efi/Makefile | 3 + xen/include/Makefile | 9 +- xen/scripts/mkmakefile | 17 ++++ xen/test/livepatch/Makefile | 2 + xen/xsm/flask/Makefile | 3 + xen/xsm/flask/ss/Makefile | 3 + 11 files changed, 194 insertions(+), 38 deletions(-) create mode 100755 xen/scripts/mkmakefile diff --git a/xen/Makefile b/xen/Makefile index 67ced3e92689..d27c213c3aa9 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -1,3 +1,7 @@ +# $(lastword,) for GNU Make older than 0.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 @@ -17,33 +21,18 @@ export XEN_BUILD_HOST ?=3D $(shell hostname) PYTHON_INTERPRETER :=3D $(word 1,$(shell which python3 python python2 2>/d= ev/null) python) export PYTHON ?=3D $(PYTHON_INTERPRETER) =20 -export XEN_ROOT :=3D $(CURDIR)/.. +$(if $(filter __%, $(MAKECMDGOALS)), \ + $(error targets prefixed with '__' are only for internal use)) =20 -srctree :=3D . -objtree :=3D . -export srctree objtree +# That's our default target when none is given on the command line +PHONY :=3D __all +__all: =20 # 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 @@ -51,14 +40,9 @@ export CC CXX LD =20 export TARGET :=3D xen =20 -.PHONY: default -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 @@ -130,14 +114,93 @@ endif =20 ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) quiet :=3D silent_ + KBUILD_VERBOSE =3D 0 endif =20 export quiet Q KBUILD_VERBOSE =20 +# $(realpath,) for GNU Make older than 0.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 + +objtree :=3D . +VPATH :=3D $(srctree) + +export building_out_of_srctree srctree objtree VPATH + +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 @@ -161,6 +224,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) @@ -196,9 +277,6 @@ CFLAGS +=3D $(CLANG_FLAGS) export CLANG_FLAGS endif =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 @@ -206,18 +284,42 @@ PHONY +=3D tools_fixdep tools_fixdep: $(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 +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 + $(Q)$(SHELL) $(srctree)/scripts/mkmakefile $(srctree) + $(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 # in tools/kconfig to make the *config target =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: tools_fixdep FORCE +%config: tools_fixdep outputmakefile FORCE $(Q)$(MAKE) $(build)=3Dtools/kconfig $@ =20 else # !config-build @@ -299,6 +401,10 @@ endif =20 CFLAGS +=3D -I$(srctree)/include CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include +ifdef building_out_of_srctree + CFLAGS +=3D -I$(objtree)/include + CFLAGS +=3D -I$(objtree)/arch/$(TARGET_ARCH)/include +endif =20 # Note that link order matters! ALL_OBJS-y :=3D common/built_in.o @@ -323,6 +429,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) @@ -426,7 +534,7 @@ $(TARGET).gz: $(TARGET) gzip -n -f -9 < $< > $@.new mv $@.new $@ =20 -$(TARGET): tools_fixdep FORCE +$(TARGET): tools_fixdep outputmakefile FORCE $(MAKE) $(build)=3Dtools $(MAKE) $(build)=3D. include/xen/compile.h $(MAKE) $(build)=3Dinclude all @@ -492,6 +600,7 @@ cloc: find . -name '*.o.cmd' -exec awk '/^source_/{print $$3;}' {} + | cloc --l= ist-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 cb8b35ceb596..6c97f539330a 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -38,7 +38,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 -mk-dir :=3D $(src) +mk-dir :=3D $(srctree)/$(src) include $(if $(wildcard $(mk-dir)/build.mk),$(mk-dir)/build.mk,$(mk-dir)/M= akefile) =20 # Linking @@ -330,6 +330,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/arm/efi/Makefile b/xen/arch/arm/efi/Makefile index 36e15ac280cd..b985043f8c80 100644 --- a/xen/arch/arm/efi/Makefile +++ b/xen/arch/arm/efi/Makefile @@ -1,5 +1,8 @@ CFLAGS-y +=3D -fshort-wchar CFLAGS-y +=3D -I$(srctree)/common/efi +ifdef building_out_of_srctree +CFLAGS-y +=3D -I$(srctree)/$(src) +endif =20 obj-y +=3D boot.init.o pe.init.o ebmalloc.o runtime.o obj-$(CONFIG_ACPI) +=3D efi-dom0.init.o diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index f0dc6820f85c..963926b37d9d 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 diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index c2385e69332d..3909db51b1fd 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 -I$(obj) +endif $(obj)/head.o: $(head-objs) =20 LDFLAGS_DIRECT_OpenBSD =3D _obsd @@ -22,7 +25,7 @@ $(call cc-option-add,CFLAGS_x86_32,CC,-Wno-unused-but-set= -variable) $(call cc-option-add,CFLAGS_x86_32,CC,-Wno-unused-local-typedefs) $(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 +CFLAGS_x86_32 +=3D -I$(srctree)/include $(if $(building_out_of_srctree), -= I$(objtree)/include) =20 # override for 32bit binaries $(head-objs:.S=3D.o): CFLAGS-stack-boundary :=3D diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile index da05935a9348..a716f3fac9cf 100644 --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -1,5 +1,8 @@ CFLAGS-y +=3D -fshort-wchar CFLAGS-y +=3D -I$(srctree)/common/efi +ifdef building_out_of_srctree +CFLAGS-y +=3D -I$(srctree)/$(src) +endif =20 quiet_cmd_objcopy_o_ihex =3D OBJCOPY $@ cmd_objcopy_o_ihex =3D $(OBJCOPY) -I ihex -O binary $< $@ diff --git a/xen/include/Makefile b/xen/include/Makefile index 4e64a31ecab3..2cd779a4108c 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -110,7 +110,7 @@ $(obj)/headers99.chk: $(PUBLIC_C99_HEADERS) $(src)/Make= file $(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)-prer= eq), -include $(j).h) \ -S -o /dev/null - \ || exit $$?; echo $(i) >> $@.new;) mv $@.new $@ @@ -124,8 +124,8 @@ $(obj)/headers++.chk: $(PUBLIC_HEADERS) $(src)/Makefile $(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 $(srctree)/$(src)/public/xen.h \ + $(foreach j, $($(patsubst $(srctree)/%,%,$i)-prereq), -include c$(j= )) -S -o /dev/null - \ || exit $$?; echo $(i) >> $@.new;) mv $@.new $@ =20 @@ -134,7 +134,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 VPATH=3D$(srctree) all =20 all: lib-x86-all endif diff --git a/xen/scripts/mkmakefile b/xen/scripts/mkmakefile new file mode 100755 index 000000000000..1cb174751429 --- /dev/null +++ b/xen/scripts/mkmakefile @@ -0,0 +1,17 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# Generates a small Makefile used in the root of the output +# directory, to allow make to be started from there. +# The Makefile also allow for more convinient build of external modules + +# Usage +# $1 - Kernel src directory + +if [ "${quiet}" !=3D "silent_" ]; then + echo " GEN Makefile" +fi + +cat << EOF > Makefile +# Automatically generated by $0: don't edit +include $1/Makefile +EOF diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index 5807a559b42a..51f93f6ba61f 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 -I$(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 d655cf8d1974..2c6febc54bf6 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -5,6 +5,9 @@ obj-y +=3D flask_op.o obj-y +=3D ss/ =20 CFLAGS-y +=3D -I$(obj)/include +ifdef building_out_of_srctree + CFLAGS-y +=3D -I$(srctree)/$(src)/include +endif =20 AWK =3D awk =20 diff --git a/xen/xsm/flask/ss/Makefile b/xen/xsm/flask/ss/Makefile index aba1339f3808..c50d67320ed3 100644 --- a/xen/xsm/flask/ss/Makefile +++ b/xen/xsm/flask/ss/Makefile @@ -9,3 +9,6 @@ obj-y +=3D conditional.o obj-y +=3D mls.o =20 CFLAGS-y +=3D -I$(srctree)/xsm/flask/include +ifdef building_out_of_srctree + CFLAGS-y +=3D -I$(objtree)/xsm/flask/include +endif --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802916; cv=none; d=zohomail.com; s=zohoarc; b=O3bCFpLucxsN3XnL1VWNytr566Mi7OlOC888ijYpMvrcd9LdT14DWnVFLQ2D72r0aX1oh7onLHrxMLm0oYAk4+xdSOf9oh1tEaJrjioSG7vxyoUcfqjsOsRLbEmAXEVrPydBoXgu/sBYbMj1yzowNCpc0Z1kpF4HgGJ+cihCQXU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802916; 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=CwvlGsFfLqicbVFRQ0Iz6D6V9ItO9vvrWHNl0cx1rIQ=; b=IlMDYQ0XRTa8El2WaBPkrdZwTr5aGRU0e8OMRlvaTVjlrY3fKruhzZgf+hNxQrRJjTQ9T0r7cgG5FO0OMAnznuTk/bNmQP441Tfc2d1yTWUoKMVYIfjWuvdT0JbdrBHzkwR/vEukBS7Z5kwySv94fcPpkE12oCbTrX76T2ezVuI= 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 162980291691816.920291443996803; Tue, 24 Aug 2021 04:01:56 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.170984.312166 (Exim 4.92) (envelope-from ) id 1mIUBV-0006PM-DW; Tue, 24 Aug 2021 11:01:37 +0000 Received: by outflank-mailman (output) from mailman id 170984.312166; Tue, 24 Aug 2021 11:01: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 1mIUBU-0006Jd-Io; Tue, 24 Aug 2021 11:01:36 +0000 Received: by outflank-mailman (input) for mailman id 170984; Tue, 24 Aug 2021 11:01:32 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU4I-0003Ux-EX for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:54:10 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 62114c5c-04c9-11ec-a8c6-12813bfff9fa; Tue, 24 Aug 2021 10:52:32 +0000 (UTC) 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: 62114c5c-04c9-11ec-a8c6-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802352; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=F/M2/vq6KWl0VqsyNOoDat2OseP4JIu38Fm2gzKcBlQ=; b=U3QYDburFTqe6KbFy+HVkOn65kkw4XoFWbBNxCzDsfIQcGiBgXQKUT7q yYgf4Kq3mxO5OwuNm/a0RojM/aW6JrMQ3tZVTj1AHiopSJrOmvivWnUlP Iwjx1ptKlL14y0IqfpIiz0PPr1jxw9gRZ4b+eCTTVe3KNSxiLzrwxb98o 4=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 4jsNkiXImDfIJLLZOZGWIqMVlMjMO+QFBJMHH+BC9qi49EwwtiuItf0s49pDPfznhjdk6JHjce 3LUwotgP/JhkFXeBfHadoRrNp7M4KiCBWL1VkYooALtdr9cj1kTmhGEY6lNKvgYThaBFWmNgst zEQjxLGBIuYR8+TXC5OitDX1vJhDNkAooXAmz9ApP9lWiOJZyiFHyUYj0O2QvDHjk3XY8GIAZl 4n9B6IY1oSOkGkdR3zmlcZeY3nRXcCG8d3Y6TIn1u7YOVy2zmk6MofpzgZKwcWTUxZD+bSv6LD qL0Jzh/1WMby5042szX1/Q3e X-SBRS: 5.1 X-MesageID: 51153615 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:tKSuF65bio8NpUvPrAPXwPDXdLJyesId70hD6qhwISY6TiX+rb HJoB17726NtN9/YhEdcLy7VJVoBEmskKKdgrNhWotKPjOW21dARbsKheCJrgEIWReOktK1vZ 0QCpSWY+eQMbEVt6nHCXGDYrQd/OU= X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51153615" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 50/51] build: specify source tree in include/ for prerequisite Date: Tue, 24 Aug 2021 11:50:37 +0100 Message-ID: <20210824105038.1257926-51-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802923393100017 Content-Type: text/plain; charset="utf-8" When doing an out-of-tree build, and thus setting VPATH, GNU Make 0.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 --- xen/include/Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index 2cd779a4108c..b94cfea74660 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -42,19 +42,19 @@ endif .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 $(srctree)/$(src)/Makefile $(srctree)= /tools/compat-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 $(srctree)/$(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 $(src= tree)/tools/compat-build-source.py +$(obj)/compat/%.c: $(src)/public/%.h $(srctree)/$(src)/xlat.lst $(srctree)= /$(src)/Makefile $(srctree)/tools/compat-build-source.py mkdir -p $(@D) $(PYTHON) $(srctree)/tools/compat-build-source.py $(srctree)/$(src)/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 $(srctree)/$(src)/Makefile export PYTHON=3D$(PYTHON); \ while read what name; do \ $(SHELL) $(srctree)/tools/get-fields.sh "$$what" compat_$$name $< || exi= t $$?; \ @@ -62,7 +62,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: $(srctree)/$(src)/xlat.lst $(srctree)/$(src)/Ma= kefile 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,$@) @@ -70,7 +70,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' $(srctree)/$(src)/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 $(srctree)/$(src)/Makefile cat $(filter %.h,$^) >$@.new mv -f $@.new $@ =20 @@ -97,7 +97,7 @@ PUBLIC_C99_HEADERS :=3D $(addprefix $(hdrs-path)/, $(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) $(srctree)/$(src)/Makefile for i in $(filter %.h,$^); do \ $(CC) -x c -ansi -Wall -Werror -include stdint.h \ -S -o /dev/null $$i || exit 1; \ @@ -105,7 +105,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) $(srctree)/$(src)/Makefile rm -f $@.new $(foreach i, $(filter %.h,$^), \ echo "#include "\"$(i)\" \ @@ -115,7 +115,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) $(srctree)/$(src)/Makefile rm -f $@.new if ! $(CXX) -v >/dev/null 2>&1; then \ touch $@.new; \ --=20 Anthony PERARD From nobody Sun May 5 07:12:38 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=1629802937; cv=none; d=zohomail.com; s=zohoarc; b=T+PJX5VVuqKZSFCcfTriDH+SXx2t1vl11WS9BcAQIBiCZwzgFrPMbQdpWbyYhrmfBITfFajQ7tXErD6J178ULCYUCN52nET064J3dQnKfywAZPwmnAwTokQ5L1Tud3fPv3o+LEOkWYXSw/f0hCfuBuDUl0grF0FkLeRB1u4Wrhk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629802937; 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=nYhFiCEdUwOspVdsL8Svv953xCkoLRWTQ9FpPW0qVlk=; b=bcvTLN31t4FC4LE2tsgS0icMiRxVEWRJ8rcrFZSdBqvpSoEDejD9xQmvirB+JlJoxpe11KiI72nwxQFNldxxRdtZwfQ2VwAcOwLGAQ5dlUQegwFaWkR0JnnSRAM3vIsH5DMoydmz+hGKhKcIazSnpPHiQeP3R/qqxxoMSvO4+K0= 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 1629802937887590.1008585651509; Tue, 24 Aug 2021 04:02:17 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.171009.312258 (Exim 4.92) (envelope-from ) id 1mIUBp-0002Aj-Fs; Tue, 24 Aug 2021 11:01:57 +0000 Received: by outflank-mailman (output) from mailman id 171009.312258; Tue, 24 Aug 2021 11:01: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 1mIUBn-0001zp-ME; Tue, 24 Aug 2021 11:01:55 +0000 Received: by outflank-mailman (input) for mailman id 171009; Tue, 24 Aug 2021 11:01:49 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIU4N-0003Ux-Ee for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 10:54:15 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 637f13da-04c9-11ec-a8c6-12813bfff9fa; Tue, 24 Aug 2021 10:52:35 +0000 (UTC) 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: 637f13da-04c9-11ec-a8c6-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629802355; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YEQGvIYAxhCe5H6wIWepHfg/efcf3yv+PfASQNpjxxI=; b=DLVv2QQYrQwqAU0lix9wgBykVEIby+uQeQQWrnoRbmHr/sVja78u04oU tILpoQaUDUWeqMkBlTZG6OXtPhMAyeJWKy6O2/+e1FYdcdXT0NbxfBpF/ +CjWsw5T+O5XZmk/p1VMpe3+1D04oejqP2t1mgeUVtS93UU4z6f3XtDul E=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 1jd2RLyJdsLUw7xBH6tEvn6hZ2r8TOw62HDrkvbwSG6H4IHuQHDxYJ0/o838D0LZZ8tw46Trpd Euk1QwcD3MXVFPJuy4SupGRqMNlPYdWz9xhfnwITTHTe7eQZSjqsE/Bzt4LqHui+L11KBB6xOM ab3Fl5fKfFB3F7uVMWcK8Qlg/UwZSULC8DkqKZSnpFsmb40puDnk6QYzPfkJaLk3m7Z6BQkRDG 33cbz/yIyaZlhmhag/X0KZcwa3KjdrWbNZhel+UuhMNPPAX0Vt81EaptD+5lE2H9DfNRZm8Cj9 nggmCTZ2WBXNen3og9rSKrIL X-SBRS: 5.1 X-MesageID: 51540954 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:LVvb+qsbCsTmq7RwlcfEHnEG7skCyoMji2hC6mlwRA09TyXGra 2TdaUgvyMc1gx7ZJh5o6HnBEGBKUm9yXcH2/hpAV7CZnishILGFvAH0WKP+VPd8k7Fh6RgPM VbAs9D4bTLZDAX4voSizPIcOrIteP3lZxA8t2urUuFIzsKV4hQqyNCTiqLGEx/QwdLQbAjEo CH28ZBrz28PVwKc8WSHBA+LqT+juyOsKijTQ8NBhYh5gXLpyiv8qTGHx+R2Qpbey9TwI0l7X POn2XCl+qeWrCAu1HhPl3ontRrcejau5h+7Qu3+4oowwDX+0eVjUJaKvi/VX4O0aWSAR0R4a HxSl8bTr9OAjXqDyyISFLWqnPd+Sdr5Hn4xVCCh3z/5cT/WTIhEsJEwZlUax3D9iMbzadBOY 9wrhakXqBsfGT9deXGlqn1fgAvklDxrWspkOYVgXAaWYwCaKVJpYha+E9OCp8PEC/z9YhiSY BVfYnhzecTdUnfY2HSv2FpztDpVnMvHg2eSkxHvsCOyTBZkH1w0kNdzs0CmXUL8o47VvB/lq 35G7UtkKsLQt4dbKp7CutEScyrCnbVSRaJK26WKUSPLtBzB5sMke+E3FwR3pDVRHUl9upPpH 3xaiIqiYdpQTOSNSSn5uw1zjndBH66QSngjtpD4pQRgMyNeIbW X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="51540954" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v7 51/51] build: add %.E targets Date: Tue, 24 Aug 2021 11:50:38 +0100 Message-ID: <20210824105038.1257926-52-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210824105038.1257926-1-anthony.perard@citrix.com> References: <20210824105038.1257926-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1629802940113100001 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 d27c213c3aa9..91b34d549970 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -586,10 +586,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 $(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 -%.o %.s: %.S tools_fixdep FORCE +%.o %.s %.E: %.S tools_fixdep FORCE $(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 %/: tools_fixdep FORCE diff --git a/xen/Rules.mk b/xen/Rules.mk index 6c97f539330a..7d6112a3cdec 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -289,6 +289,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