From nobody Thu May 2 11:55:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579258501; cv=none; d=zohomail.com; s=zohoarc; b=anHsF73E3wYSD66pnTpDYn+SNrkIxpd66SoFjVZkeyhQ0N4FubRYDPNF2pJ+O+3D8rpwB13e6+IylLUeQ1o/NZRNB1pz/sWH1Y+fJEN1vY8lx6bn3IHDug4d1utfomGjj0Muf2YULKc11hnJlSDJJ/qjXfdlTMCsJulGrNOwnW0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579258501; 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=YbK5VyLMk8n4wv8PM0nArChUOilTSWf1rGje2xZAkQ4=; b=bsPUn61y4JESqUstroySv93WsrnoZ/hbF3xvBf93TnRO8I5LUJbsdDFx3V9fGo0mbDQyMR+tWm+jAuZQ4ms+p404VwIKrCQxbe26YZLpNQAYq8Ko/7s8e6o+PimE4nJXI6uyQTiXhI0pZUKoR01qSDLUHC5UNUZ9JxlBKMlFODQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579258501466380.3165850447773; Fri, 17 Jan 2020 02:55:01 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPGg-0004wJ-AP; Fri, 17 Jan 2020 10:54:22 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPGe-0004vf-LS for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 10:54:20 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b10dd35e-3917-11ea-b833-bc764e2007e4; Fri, 17 Jan 2020 10:54:10 +0000 (UTC) X-Inumbo-ID: b10dd35e-3917-11ea-b833-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579258450; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bp6VeAtawBJ7+KlC2XEdokxk4K2nHX7ktie28XH2YH8=; b=TzdR+j1xBCYBH+P+UTqX3BvJxSldGklZhTtabq7IP4O4T50tciKSLGvU jAIRWALfCwjRg3qaBMKDqGTiJA6emr7uSAyDV0vfIMQ9jzEIXzRZJ6IhN BBinQo9vY8DfqKzkpwcTpJXMDUut270BKy2iUMH6vd0bAVa0yzVAOIeZo I=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: itnPg+duLNhOj4iFx7kyj+aVvzuXCS7Z+mMrNKL6mx5Nv5J0aqUzFlcX3lcNvnC6wp7iTmmYbi Li7hMrcav0PrmCLA4mf3NMtYPFZlsQ5JSqrTIi3Bqf4GW406kuGqDlra1S2RvLTYJZrglJAdHT Klo1HRWk7QhcRqt5RhXSAk7DHTcfc7hUC+oJkAcF1YjU+gWeCyipVTnEt4xWY431NwNQ5lrcQN z4H02iyJ1rAU8DlsTH+uGpR59vxljkz5n7Qi2AleDJMKKlrRsz3TZLAOpVRsI/uYIa2LTVrDhc ILA= X-SBRS: 2.7 X-MesageID: 11498515 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,329,1574139600"; d="scan'208";a="11498515" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:47 +0000 Message-ID: <20200117105358.607910-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 01/12] xen/build: Remove left over -DMAX_PHYS_IRQS X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Anthony PERARD , Jan Beulich , Anthony PERARD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Anthony PERARD The use of MAX_PHYS_IRQS have been removed in cf5e6f2d3441 ("x86: eliminate hard-coded NR_IRQS"), so remove the left over CFLAGS. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Rules.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index fcdafd029342..22f25c5b2be8 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -71,10 +71,6 @@ ifneq ($(CONFIG_CC_IS_CLANG),y) CFLAGS +=3D -Wa,--strip-local-absolute endif =20 -ifneq ($(max_phys_irqs),) -CFLAGS-y +=3D -DMAX_PHYS_IRQS=3D$(max_phys_irqs) -endif - AFLAGS-y +=3D -D__ASSEMBLY__ =20 ALL_OBJS :=3D $(ALL_OBJS-y) --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579258498; cv=none; d=zohomail.com; s=zohoarc; b=bQkZEVArn4H0AFzpAyzlB04SvMgaqMezdNgR1oMUv38DSlG+4iYeMwYeVamLFe0Xv+km1U8QMfnLNNv54T+ArnH2Y9+k6A6XRlTbPAn5EGgcp46bs2mOpN4QKF//rfhCpbON0c0F9M1o0lO9HAG/uIia8pmEiyl6R2AlJk8MJSQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579258498; 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=TPPGKqrC/69bHS7fGyuhOXqyAVhd36Iuk4BIr2+L4LQ=; b=hTs5S00UN7dl6HgVb1/3GyqaA8ReKIfDrcgSZcAX/PMZLwTqlFTSy7yWjp06AISH4feBoQHrX2NU8VV8XPbjPbe9xW3ilCYdK+a4yUxIWemVjiMjrA63zGOgGxEdf3jD3Oi58bM7W9plWSfcCR5XXIqEXYETmzMWnSucnkQZEPE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579258498459170.05617186186237; Fri, 17 Jan 2020 02:54:58 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPGT-0004rP-Ke; Fri, 17 Jan 2020 10:54:09 +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.89) (envelope-from ) id 1isPGR-0004rK-TT for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 10:54:07 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ac23702f-3917-11ea-88b0-12813bfff9fa; Fri, 17 Jan 2020 10:54:03 +0000 (UTC) X-Inumbo-ID: ac23702f-3917-11ea-88b0-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579258443; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OkZwjS3pj+/ZAonBHya3McIakWZxrlb5MxoOipB81G0=; b=akK6Wmj3BlrTnAZhKtyfDplzyzA0JDkZo+6ag70osOuoBgD0eX/6ZkxC 6a24AU5n/R83XwFQFxJvy1QwG3Q54ZGpQMaYphRk5bZcDFdjhwAWvf0gB hK63ZCLKZi2bbhVVjPhHq4no75LcbIbi/ERzX7ZGdl6gtMZnN55Vy+Ko7 c=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: kBRTzXiohr4IKnoCTTTEz3q++zRBAy+HtcQbJYn3c2L61IdtAZSHnhfrfQpc0gQ8mpW9HM1VQ/ /u5zqVJMnIPO5J24wqxxyYYpSW9sw765CBvBunn8imj4o440hbIJsA5oFQ5ZbgBmO3Wt+eU6Va 4191dZFmbzwK15QsuP87FzCdqh6+UegWNEETSj3CwmpdMnvy5kGl7yBOxI+m4mjn1Qnxl/i6yH J+D9SMfCJLyMwXXJQqt9fGOP0xGQZPfyTV8K7SUbb4g3tCIPtOD2V4RMqWw7sXa6ACqzCX+QBM xrE= X-SBRS: 2.7 X-MesageID: 11432448 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,329,1574139600"; d="scan'208";a="11432448" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:48 +0000 Message-ID: <20200117105358.607910-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 02/12] xen/build: Use obj-y += subdir/ instead of subdir-y X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Kevin Tian , Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , Anthony PERARD , Daniel De Graaf , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This is part of upgrading our build system and import more of Linux's one. In Linux, subdir-y in Makefiles is only used to descend into subdirectory when there are no object to build, Xen doesn't have that and all subdir have object to be included in the final binary. To allow the new syntax, the "obj-y" and "subdir-*" calculation in Rules.mk is changed and partially imported from Linux's Kbuild. The command used to modify the Makefile was: sed -i -r 's#^subdir-(.*)#obj-\1/#;' **/Makefile Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Rules.mk | 21 ++++++++++----------- xen/arch/arm/Makefile | 14 +++++++------- xen/arch/arm/arm32/Makefile | 2 +- xen/arch/arm/arm64/Makefile | 2 +- xen/arch/x86/Makefile | 18 +++++++++--------- xen/arch/x86/acpi/Makefile | 2 +- xen/arch/x86/cpu/Makefile | 4 ++-- xen/arch/x86/guest/Makefile | 4 ++-- xen/arch/x86/hvm/Makefile | 6 +++--- xen/arch/x86/mm/Makefile | 4 ++-- xen/arch/x86/x86_64/Makefile | 2 +- xen/common/Makefile | 8 ++++---- xen/drivers/Makefile | 14 +++++++------- xen/drivers/acpi/Makefile | 6 +++--- xen/drivers/passthrough/Makefile | 8 ++++---- xen/drivers/passthrough/vtd/Makefile | 2 +- xen/lib/Makefile | 2 +- xen/xsm/Makefile | 2 +- xen/xsm/flask/Makefile | 2 +- 19 files changed, 61 insertions(+), 62 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 22f25c5b2be8..8b04cbdd24ca 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -105,17 +105,16 @@ define gendep endef $(foreach o,$(filter-out %/,$(obj-y) $(obj-bin-y) $(extra-y)),$(eval $(cal= l gendep,$(o)))) =20 -# Ensure each subdirectory has exactly one trailing slash. -subdir-n :=3D $(patsubst %,%/,$(patsubst %/,%,$(subdir-n) $(subdir-))) -subdir-y :=3D $(patsubst %,%/,$(patsubst %/,%,$(subdir-y))) - -# Add explicitly declared subdirectories to the object lists. -obj-y +=3D $(patsubst %/,%/built_in.o,$(subdir-y)) - -# Add implicitly declared subdirectories (in the object lists) to the -# subdirectory list, and rewrite the object-list entry. -subdir-y +=3D $(filter %/,$(obj-y)) -obj-y :=3D $(patsubst %/,%/built-in.o,$(obj-y)) +# 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 $(filter %/, $(obj-y)) +subdir-y +=3D $(__subdir-y) +obj-y :=3D $(patsubst %/, %/built_in.o, $(obj-y)) + +subdir-n :=3D $(subdir-n) $(subdir-) \ + $(filter %/, $(obj-n) $(obj-)) =20 subdir-all :=3D $(subdir-y) $(subdir-n) =20 diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 70f532e42a06..1044c2298a05 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -1,11 +1,11 @@ -subdir-$(CONFIG_ARM_32) +=3D arm32 -subdir-$(CONFIG_ARM_64) +=3D arm64 -subdir-$(CONFIG_ARM_64) +=3D efi -subdir-$(CONFIG_ACPI) +=3D acpi +obj-$(CONFIG_ARM_32) +=3D arm32/ +obj-$(CONFIG_ARM_64) +=3D arm64/ +obj-$(CONFIG_ARM_64) +=3D efi/ +obj-$(CONFIG_ACPI) +=3D acpi/ ifneq ($(CONFIG_NO_PLAT),y) -subdir-y +=3D platforms +obj-y +=3D platforms/ endif -subdir-$(CONFIG_TEE) +=3D tee +obj-$(CONFIG_TEE) +=3D tee/ =20 obj-$(CONFIG_HAS_ALTERNATIVE) +=3D alternative.o obj-y +=3D bootfdt.init.o @@ -48,7 +48,7 @@ obj-y +=3D sysctl.o obj-y +=3D time.o obj-y +=3D traps.o obj-y +=3D vcpreg.o -subdir-$(CONFIG_NEW_VGIC) +=3D vgic +obj-$(CONFIG_NEW_VGIC) +=3D vgic/ ifneq ($(CONFIG_NEW_VGIC),y) obj-y +=3D gic-vgic.o obj-y +=3D vgic.o diff --git a/xen/arch/arm/arm32/Makefile b/xen/arch/arm/arm32/Makefile index 0ac254f34714..539bbef298a7 100644 --- a/xen/arch/arm/arm32/Makefile +++ b/xen/arch/arm/arm32/Makefile @@ -1,4 +1,4 @@ -subdir-y +=3D lib +obj-y +=3D lib/ =20 obj-$(EARLY_PRINTK) +=3D debug.o obj-y +=3D domctl.o diff --git a/xen/arch/arm/arm64/Makefile b/xen/arch/arm/arm64/Makefile index c4f3a28a0d0b..db8565b71a33 100644 --- a/xen/arch/arm/arm64/Makefile +++ b/xen/arch/arm/arm64/Makefile @@ -1,4 +1,4 @@ -subdir-y +=3D lib +obj-y +=3D lib/ =20 obj-y +=3D cache.o obj-$(CONFIG_HARDEN_BRANCH_PREDICTOR) +=3D bpi.o diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 6783688b00be..461d1f3dc2a6 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -1,12 +1,12 @@ -subdir-y +=3D acpi -subdir-y +=3D cpu -subdir-y +=3D genapic -subdir-$(CONFIG_GUEST) +=3D guest -subdir-$(CONFIG_HVM) +=3D hvm -subdir-y +=3D mm -subdir-$(CONFIG_XENOPROF) +=3D oprofile -subdir-$(CONFIG_PV) +=3D pv -subdir-y +=3D x86_64 +obj-y +=3D acpi/ +obj-y +=3D cpu/ +obj-y +=3D genapic/ +obj-$(CONFIG_GUEST) +=3D guest/ +obj-$(CONFIG_HVM) +=3D hvm/ +obj-y +=3D mm/ +obj-$(CONFIG_XENOPROF) +=3D oprofile/ +obj-$(CONFIG_PV) +=3D pv/ +obj-y +=3D x86_64/ =20 alternative-y :=3D alternative.init.o alternative-$(CONFIG_LIVEPATCH) :=3D diff --git a/xen/arch/x86/acpi/Makefile b/xen/arch/x86/acpi/Makefile index 27b4aa30b0ca..1b9e62571301 100644 --- a/xen/arch/x86/acpi/Makefile +++ b/xen/arch/x86/acpi/Makefile @@ -1,4 +1,4 @@ -subdir-y +=3D cpufreq +obj-y +=3D cpufreq/ =20 obj-y +=3D lib.o power.o suspend.o cpu_idle.o cpuidle_menu.o obj-bin-y +=3D boot.init.o wakeup_prot.o diff --git a/xen/arch/x86/cpu/Makefile b/xen/arch/x86/cpu/Makefile index 466acc8b10e5..de983006a1b1 100644 --- a/xen/arch/x86/cpu/Makefile +++ b/xen/arch/x86/cpu/Makefile @@ -1,5 +1,5 @@ -subdir-y +=3D mcheck -subdir-y +=3D mtrr +obj-y +=3D mcheck/ +obj-y +=3D mtrr/ =20 obj-y +=3D amd.o obj-y +=3D centaur.o diff --git a/xen/arch/x86/guest/Makefile b/xen/arch/x86/guest/Makefile index f164196772e8..a1e370d69df8 100644 --- a/xen/arch/x86/guest/Makefile +++ b/xen/arch/x86/guest/Makefile @@ -1,4 +1,4 @@ obj-y +=3D hypervisor.o =20 -subdir-$(CONFIG_HYPERV_GUEST) +=3D hyperv -subdir-$(CONFIG_XEN_GUEST) +=3D xen +obj-$(CONFIG_HYPERV_GUEST) +=3D hyperv/ +obj-$(CONFIG_XEN_GUEST) +=3D xen/ diff --git a/xen/arch/x86/hvm/Makefile b/xen/arch/x86/hvm/Makefile index 43e5f3a21f8b..346419154460 100644 --- a/xen/arch/x86/hvm/Makefile +++ b/xen/arch/x86/hvm/Makefile @@ -1,6 +1,6 @@ -subdir-y +=3D svm -subdir-y +=3D vmx -subdir-y +=3D viridian +obj-y +=3D svm/ +obj-y +=3D vmx/ +obj-y +=3D viridian/ =20 obj-y +=3D asid.o obj-y +=3D dm.o diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index 5010a29d6cb0..d87dc0aa6eeb 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -1,5 +1,5 @@ -subdir-y +=3D shadow -subdir-$(CONFIG_HVM) +=3D hap +obj-y +=3D shadow/ +obj-$(CONFIG_HVM) +=3D hap/ =20 obj-$(CONFIG_HVM) +=3D altp2m.o obj-$(CONFIG_HVM) +=3D guest_walk_2.o guest_walk_3.o guest_walk_4.o diff --git a/xen/arch/x86/x86_64/Makefile b/xen/arch/x86/x86_64/Makefile index 4bfa1480eb7e..2bb1eb0a8131 100644 --- a/xen/arch/x86/x86_64/Makefile +++ b/xen/arch/x86/x86_64/Makefile @@ -1,4 +1,4 @@ -subdir-$(CONFIG_PV) +=3D compat +obj-$(CONFIG_PV) +=3D compat/ =20 obj-bin-y +=3D entry.o obj-y +=3D traps.o diff --git a/xen/common/Makefile b/xen/common/Makefile index 62b34e69e95c..d4db0a6d466a 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -73,8 +73,8 @@ obj-$(CONFIG_COMPAT) +=3D $(addprefix compat/,domain.o ke= rnel.o memory.o multicall =20 extra-y :=3D symbols-dummy.o =20 -subdir-$(CONFIG_COVERAGE) +=3D coverage -subdir-$(CONFIG_UBSAN) +=3D ubsan +obj-$(CONFIG_COVERAGE) +=3D coverage/ +obj-$(CONFIG_UBSAN) +=3D ubsan/ =20 -subdir-$(CONFIG_NEEDS_LIBELF) +=3D libelf -subdir-$(CONFIG_HAS_DEVICE_TREE) +=3D libfdt +obj-$(CONFIG_NEEDS_LIBELF) +=3D libelf/ +obj-$(CONFIG_HAS_DEVICE_TREE) +=3D libfdt/ diff --git a/xen/drivers/Makefile b/xen/drivers/Makefile index 30bab3cfdb36..2a1ae8ad130a 100644 --- a/xen/drivers/Makefile +++ b/xen/drivers/Makefile @@ -1,7 +1,7 @@ -subdir-y +=3D char -subdir-$(CONFIG_HAS_CPUFREQ) +=3D cpufreq -subdir-$(CONFIG_HAS_PCI) +=3D pci -subdir-$(CONFIG_HAS_VPCI) +=3D vpci -subdir-$(CONFIG_HAS_PASSTHROUGH) +=3D passthrough -subdir-$(CONFIG_ACPI) +=3D acpi -subdir-$(CONFIG_VIDEO) +=3D video +obj-y +=3D char/ +obj-$(CONFIG_HAS_CPUFREQ) +=3D cpufreq/ +obj-$(CONFIG_HAS_PCI) +=3D pci/ +obj-$(CONFIG_HAS_VPCI) +=3D vpci/ +obj-$(CONFIG_HAS_PASSTHROUGH) +=3D passthrough/ +obj-$(CONFIG_ACPI) +=3D acpi/ +obj-$(CONFIG_VIDEO) +=3D video/ diff --git a/xen/drivers/acpi/Makefile b/xen/drivers/acpi/Makefile index 444b11d5839d..4f8e97228ee2 100644 --- a/xen/drivers/acpi/Makefile +++ b/xen/drivers/acpi/Makefile @@ -1,6 +1,6 @@ -subdir-y +=3D tables -subdir-y +=3D utilities -subdir-$(CONFIG_X86) +=3D apei +obj-y +=3D tables/ +obj-y +=3D utilities/ +obj-$(CONFIG_X86) +=3D apei/ =20 obj-bin-y +=3D tables.init.o obj-$(CONFIG_NUMA) +=3D numa.o diff --git a/xen/drivers/passthrough/Makefile b/xen/drivers/passthrough/Mak= efile index d50ab188c83c..e973e16c7484 100644 --- a/xen/drivers/passthrough/Makefile +++ b/xen/drivers/passthrough/Makefile @@ -1,7 +1,7 @@ -subdir-$(CONFIG_X86) +=3D vtd -subdir-$(CONFIG_X86) +=3D amd -subdir-$(CONFIG_X86) +=3D x86 -subdir-$(CONFIG_ARM) +=3D arm +obj-$(CONFIG_X86) +=3D vtd/ +obj-$(CONFIG_X86) +=3D amd/ +obj-$(CONFIG_X86) +=3D x86/ +obj-$(CONFIG_ARM) +=3D arm/ =20 obj-y +=3D iommu.o obj-$(CONFIG_HAS_PCI) +=3D pci.o diff --git a/xen/drivers/passthrough/vtd/Makefile b/xen/drivers/passthrough= /vtd/Makefile index f302653858a0..fde7555fac07 100644 --- a/xen/drivers/passthrough/vtd/Makefile +++ b/xen/drivers/passthrough/vtd/Makefile @@ -1,4 +1,4 @@ -subdir-$(CONFIG_X86) +=3D x86 +obj-$(CONFIG_X86) +=3D x86/ =20 obj-y +=3D iommu.o obj-y +=3D dmar.o diff --git a/xen/lib/Makefile b/xen/lib/Makefile index dcdb75931378..7019ca00e8fd 100644 --- a/xen/lib/Makefile +++ b/xen/lib/Makefile @@ -1 +1 @@ -subdir-$(CONFIG_X86) +=3D x86 +obj-$(CONFIG_X86) +=3D x86/ diff --git a/xen/xsm/Makefile b/xen/xsm/Makefile index e4d581e065f8..cf0a728f1c96 100644 --- a/xen/xsm/Makefile +++ b/xen/xsm/Makefile @@ -3,4 +3,4 @@ obj-$(CONFIG_XSM) +=3D xsm_policy.o obj-$(CONFIG_XSM) +=3D dummy.o obj-$(CONFIG_XSM_SILO) +=3D silo.o =20 -subdir-$(CONFIG_XSM_FLASK) +=3D flask +obj-$(CONFIG_XSM_FLASK) +=3D flask/ diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 7c3f381287be..b1fd45421993 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -2,7 +2,7 @@ obj-y +=3D avc.o obj-y +=3D hooks.o obj-y +=3D flask_op.o =20 -subdir-y +=3D ss +obj-y +=3D ss/ =20 CFLAGS +=3D -I./include =20 --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579258497; cv=none; d=zohomail.com; s=zohoarc; b=f5UWCsj29dHuGm3J5BlEOFMsg+thf4lxrMeOc/mWORyDz0fGUNrf1+qjWdXB943CREgn28ArKoIBzSlNBipDUZJ9Vqy6z6ONV908l7N3U6O/7zrHVWo313OArUI8xI1VSQUB3CkdpOgvpbiiR16qNDEvTOFxn6JsOWDz4h5AKz8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579258497; 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=5XqkESbiDvqr2U0t1g5LSlPQSzPGng8pQxFdp+qHc/s=; b=mnMRCYJXu8sxCHwFNXvNu1ue59rHE3oHZLPeGhreOj8iS23Ys7qs/UYiS8jKieI12h+3bUPkV2nwPClBD3B8/4CT+rOV0MC85KMlPV+c2vllL6irx7OpzA3eLC5KeCmUPaxoRI1Qs3DdkIp6JH4u2bIv/Bo0IQkbFiOMJucFEek= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579258497724292.2481968469465; Fri, 17 Jan 2020 02:54:57 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPGa-0004tP-LO; Fri, 17 Jan 2020 10:54:16 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPGZ-0004sW-KH for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 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 abe97ca2-3917-11ea-8e9a-bc764e2007e4; Fri, 17 Jan 2020 10:54:02 +0000 (UTC) X-Inumbo-ID: abe97ca2-3917-11ea-8e9a-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579258442; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jiF1/fUcVDrgXgau77P1H2MuBbFylED2F0KmBkGvr2s=; b=E6R4KR/ApF2wMJX9+6botW5c9lao/+cp1hEtAvOjb88ioLZkwLZ09fgl qss7NOp2GeB0FkLgXcYXNENOH4BJEgVKZKcRMLt59rX7fqNpS8fxBEILo NjpETxDBqCL9FyToqsyQVbhPNzyzGrWp8iwI0HzHuNyfyDpqqUUfzBy8z M=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: HPH7t11yLUKN87tdsVKkomuUZue4UJje9WK43aNJi9F3Jfgpm6M9J3qpLv1+zRXkJmKI6KxZmi D3vGB0Vuec4HyCJYfa1Lchr0iQvHqr7nCkI4un075A62qjCUJUy2AMa4/Q/f9UP4iFvOjb4LDD AiJ1NjTjbOP+m+HHPFpGWHz1Rqq/9r4Rcga1la7MBhymx8tL+AoRPj68nntVBAqwn3kMLNa4Tn DssVGAxaed+ODoMrMQgpF2t965Hs5LdA27jPrlOHp37QXmiPnPWmrA31z9QMfkvFKs5wTnxTgf lKs= X-SBRS: 2.7 X-MesageID: 11432447 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,329,1574139600"; d="scan'208";a="11432447" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:49 +0000 Message-ID: <20200117105358.607910-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 03/12] xen/build: use $(clean) shorthand for clean targets X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Anthony PERARD , Jan Beulich , Anthony PERARD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Anthony PERARD Collect all the clean targets as we are going to modify it shortly. Also, this is inspired by Linux's Kbuild. "Kbuild.include" isn't included by "Makefile", but the "_clean" target is only used by Rules.mk which include Kbuild.include. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Makefile | 16 ++++++++-------- xen/Rules.mk | 2 +- xen/scripts/Kbuild.include | 5 +++++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index c326fee5880e..814011175fd8 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -117,14 +117,14 @@ _debug: .PHONY: _clean _clean: delete-unfresh-files $(MAKE) -C tools clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C include clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C common clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/arm clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/x86 clean - $(MAKE) -f $(BASEDIR)/Rules.mk -C test clean + $(MAKE) $(clean) include + $(MAKE) $(clean) common + $(MAKE) $(clean) drivers + $(MAKE) $(clean) xsm + $(MAKE) $(clean) crypto + $(MAKE) $(clean) arch/arm + $(MAKE) $(clean) arch/x86 + $(MAKE) $(clean) test $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SRCAR= CH=3D$(SRCARCH) clean find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" -o -name "*.gcno" = \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map *~ core diff --git a/xen/Rules.mk b/xen/Rules.mk index 8b04cbdd24ca..120323717d87 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -185,7 +185,7 @@ FORCE: clean:: $(addprefix _clean_, $(subdir-all)) rm -f *.o .*.o.tmp *~ core $(DEPS_RM) _clean_%/: FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean + $(MAKE) $(clean) $* =20 SRCPATH :=3D $(patsubst $(BASEDIR)/%,%,$(CURDIR)) =20 diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index a5c462fd9777..2465cc4060c3 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -5,3 +5,8 @@ # cc-ifversion # 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)) + +# Shorthand for $(MAKE) clean +# Usage: +# $(MAKE) $(clean) dir +clean :=3D -f $(BASEDIR)/Rules.mk clean -C --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579258499; cv=none; d=zohomail.com; s=zohoarc; b=TaCP1wY53ox3g2CWPRCg0gzRjvWHQVS/FVlUABB61335r4Phe5YuRMXV0vVOC5PS/oD9HOAuua8wBH782QlHDW6JbHyrM8BJ7Kji4S7AMO2hMEfTQDrQDXo74Br3HcdqtYvP+zYgFTPEoEfqgzL5vZuykhcObIuS5X4NNyiKVpk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579258499; 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=oBMQ0jWlY1f/MkczuweQ/82TJdeJPpLuk3hNoaCxF3U=; b=A7g3uq1D8Edn+GTpNfPAEjb5N8nq22S3jonhh3skQOb+1EoUO6DuckHjUKnWJeXr6dmFU8czo3bYzlF04LapuOi/WvguFwTcDYR1XXTC1cm2B1f2vRTkpl0Z6+dyfE0a7cv86B79IeRyoXSDVkYdphaw/SsVfgtBIXY8/0ycTjE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579258499846998.3754008160223; Fri, 17 Jan 2020 02:54:59 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPGY-0004rw-7Y; Fri, 17 Jan 2020 10:54:14 +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.89) (envelope-from ) id 1isPGW-0004rm-TO for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 10:54:12 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ad953898-3917-11ea-88b0-12813bfff9fa; Fri, 17 Jan 2020 10:54:05 +0000 (UTC) X-Inumbo-ID: ad953898-3917-11ea-88b0-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579258444; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BaVL54Bogf22hBGa7/sAqmT8wuvNZRQ1/2NJj3UBFd0=; b=KAV/BxKfLKTkHA7ctSnpMFWvXBN+bFHq+iL3y/xtbwzxWDRK2UxyKRmv YySzaSYcxvo7TCl6Tcv+pRgK/jILPrYPMThR5JbNGUu9B4bbMpomwzEAt q1CQXdi3hzAkhyQBGgWewnxSTZ1TeR23rEnZV+nFvkgtzrcAs9+1ycMiA E=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: CgK8RSRYP93o4sJcM7pfI3F88EkDAWf6XUZ2sXgXh1BlTfIMK0eb2ZRcjF4RVm1ENbtl8zFyxd soFOFNcYR8YpKCzxysRK+4ph0X/M3EAXUIpSyVJNQP5vtsdV7KTxBYk70D6vi57SgcHQnjFOpT /dTXfOK1WcQ6RejjSeKducrs5KgxVRYPkNOIfRNeGKiCreEso9xvG2AkpAPI1eDVot5TeL80fI ZYNGVDeRHwQwCAHbCb2PmuurLQWuF54cf0/6nyAsRIZep1kjKCnPYGp8ArdbxTGMC23FKnBQAU kNE= X-SBRS: 2.7 X-MesageID: 11432449 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,329,1574139600"; d="scan'208";a="11432449" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:50 +0000 Message-ID: <20200117105358.607910-5-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 04/12] xen/build: extract clean target from Rules.mk X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Anthony PERARD , Jan Beulich , Anthony PERARD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Anthony PERARD Most of the code executed by Rules.mk isn't necessary for the clean target, especially not the CFLAGS. This make running make clean much faster. This extract the code into a different Makefile. It doesn't want to include Config.mk either so variables DEPS_RM and DEPS_INCLUDE are extracted from Config.mk as well. DEPS_INCLUDE is put into Kbuild.include so it could be use by other Makefiles. This is inspired by Kbuild, with Makefile.clean partially copied from Linux v5.4. Signed-off-by: Anthony PERARD --- xen/Rules.mk | 13 ------------- xen/scripts/Kbuild.include | 7 ++++++- xen/scripts/Makefile.clean | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 xen/scripts/Makefile.clean diff --git a/xen/Rules.mk b/xen/Rules.mk index 120323717d87..deab0abd63e1 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -94,8 +94,6 @@ LDFLAGS +=3D $(LDFLAGS-y) =20 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk =20 -DEPS =3D .*.d - include Makefile =20 define gendep @@ -113,11 +111,6 @@ __subdir-y :=3D $(filter %/, $(obj-y)) subdir-y +=3D $(__subdir-y) obj-y :=3D $(patsubst %/, %/built_in.o, $(obj-y)) =20 -subdir-n :=3D $(subdir-n) $(subdir-) \ - $(filter %/, $(obj-n) $(obj-)) - -subdir-all :=3D $(subdir-y) $(subdir-n) - $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS +=3D -DINIT_SE= CTIONS_ONLY =20 ifeq ($(CONFIG_COVERAGE),y) @@ -181,12 +174,6 @@ FORCE: %/built_in_bin.o: FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in_bin.o =20 -.PHONY: clean -clean:: $(addprefix _clean_, $(subdir-all)) - rm -f *.o .*.o.tmp *~ core $(DEPS_RM) -_clean_%/: FORCE - $(MAKE) $(clean) $* - SRCPATH :=3D $(patsubst $(BASEDIR)/%,%,$(CURDIR)) =20 %.o: %.c Makefile diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 2465cc4060c3..6a9b0c39da53 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -2,6 +2,11 @@ #### # kbuild: Generic definitions =20 +### +# dependencies +DEPS =3D .*.d +DEPS_INCLUDE =3D $(addsuffix .d2, $(basename $(wildcard $(DEPS)))) + # cc-ifversion # 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)) @@ -9,4 +14,4 @@ cc-ifversion =3D $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $(2= )000 ] && echo $(3) || e # Shorthand for $(MAKE) clean # Usage: # $(MAKE) $(clean) dir -clean :=3D -f $(BASEDIR)/Rules.mk clean -C +clean :=3D -f $(BASEDIR)/scripts/Makefile.clean clean -C diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean new file mode 100644 index 000000000000..31cf2b59594e --- /dev/null +++ b/xen/scripts/Makefile.clean @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: GPL-2.0 +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +# 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 + +clean:: + +include $(BASEDIR)/scripts/Kbuild.include + +include Makefile + +# 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 +__subdir-y :=3D $(filter %/, $(obj-y)) +subdir-y +=3D $(__subdir-y) +subdir-n :=3D $(subdir-n) $(subdir-) \ + $(filter %/, $(obj-n) $(obj-)) +subdir-all :=3D $(subdir-y) $(subdir-n) + +DEPS_RM =3D $(DEPS) $(DEPS_INCLUDE) +.PHONY: clean +clean:: $(addprefix _clean_, $(subdir-all)) + rm -f *.o .*.o.tmp *~ core $(DEPS_RM) + +# Descending +# ------------------------------------------------------------------------= --- + +_clean_%/: FORCE + $(MAKE) $(clean) $* + +# Force execution of pattern rules (for which PHONY cannot be directly use= d). +.PHONY: FORCE +FORCE: --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579258499; cv=none; d=zohomail.com; s=zohoarc; b=IyihlGkDQkkilUo7Nymz+r2O35trj6chCW5fk4kDlXge75DoVoho+po5aBMucZz75/b+gYo3D6Hq0IzwXexlhFJqseTS5rVG3T7KdW9AjUjtAP8dl1OuDWyrLzk0yiwmWdFmzFXAg2Z8fbJ4PyrgHpI5IYwiZrrJnM3bdyRe120= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579258499; 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=yKJzgDCSREPc5AnRCXUSKr0pgRVV89QGRTSzpvLuPSw=; b=PwIJU8jpYtIUJn1nP191afqq75PISesz0kV7MBlLtQCdRrXyncfMD3vxe1DVWWY+jJ9z1wYlRqu32emBmHGZ/18irh7g5M7TI6vMFM4k0KKIKtTS6OYNq8Yjc3PAoGc8Y0V6t+EU4xdGJDafbte92v4ug0C6STLT/YCiOXsEBOU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579258499837891.1761961328475; Fri, 17 Jan 2020 02:54:59 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPGc-0004ul-W1; Fri, 17 Jan 2020 10:54:18 +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.89) (envelope-from ) id 1isPGb-0004uA-Tf for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 10:54:17 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id af6d3e4a-3917-11ea-88b0-12813bfff9fa; Fri, 17 Jan 2020 10:54:07 +0000 (UTC) X-Inumbo-ID: af6d3e4a-3917-11ea-88b0-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579258447; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6/qLtkj5Jww3gcQ65tbXPo+HgTWCoq9UnH4sl83WjiQ=; b=HN5dR0nxa187o49+EAq3alSjy3DKMYCXoLJYgZzE+T6PyMx7nGSAHcsS ZyC3C/b7oLRL/aZk95OTStM3tgEGz9viwdDvJ/F5aBOXNZsxgr7/rYdx0 lqAck2RQ7aLYSO9nK8pq8B6nEo8himDoYR6UikqT1taImF0sQfqz2QmNi I=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: v5wtkjO/h4kST/tUm8SjDFWG9L5NuJYxBF173ZfCt8+DjuKgjd6s9pGJfyTni+pqRnc2Xz+WQA VaFmY48d8/1HHMutR+eWkZDMshQ0jdbCblzz034SaA7up2sJM4x2HnewYGRgBX4S8MfhbFLIH6 tZZpRH6Kb7lOM67R+RBO+jBYAIwPkvWWxfxBEoJwAEahetAq16k+YaXiMk5PUpzni1bjBVL17Z I7NSgxxBDRqVlct7MSeGNqqKW5SxC39kM6NHK2Ovyel4/0LWqi0L915mxw1GcfUcYhwZKoBy2o kLs= X-SBRS: 2.7 X-MesageID: 11432450 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,329,1574139600"; d="scan'208";a="11432450" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:51 +0000 Message-ID: <20200117105358.607910-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 05/12] xen/include: remove include of Config.mk X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , Anthony PERARD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) It isn't necessary to include Config.mk here because this Makefile is only used by xen/Rules.mk which already includes Config.mk. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/include/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index fde0ca013121..433bad9055b2 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -1,5 +1,3 @@ -include $(XEN_ROOT)/Config.mk - ifneq ($(CONFIG_COMPAT),) =20 compat-arch-$(CONFIG_X86) :=3D x86_32 --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579258500; cv=none; d=zohomail.com; s=zohoarc; b=Za6VNd++6Ui2ARqa/mpuIIMbw2AuPmpL3BGTR9q8p3wGCwCC4/uiNOJqPMctglW/cqE9diWlPOZ7KH7Rfcd6h5nBS2bmEz6PRlWNMTsqggP8Eglxgu3ZA8cK5X8Ua9t/o6EX7xj8t0ZUB7oDU6Mv/ra/Pas/lA40uA6bIpPzP8k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579258500; 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=fnfmHx46NG50AClL6/2jkVoWkX3MKpQeAh4FrKoz404=; b=VHnFp4PhzDvG6cj7vkI1mtK9YqdMJskmcTD70GvxlOhGgKQVaxGCTalsJ4ipAKlenqUTI16FFPU5b/WGtpvfQ9wLH9eoOUFhO8dJicJ6li137WIev/hdzWxT53LNLxS+yltDCv2mKvFEtKizrRculRkVBM/4i/vgJI9hvdNz+C4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579258500939469.0005006309093; Fri, 17 Jan 2020 02:55:00 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPGh-0004xD-Jt; Fri, 17 Jan 2020 10:54: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.89) (envelope-from ) id 1isPGg-0004wj-Tr for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 10:54:22 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id af6d3e4b-3917-11ea-88b0-12813bfff9fa; Fri, 17 Jan 2020 10:54:08 +0000 (UTC) X-Inumbo-ID: af6d3e4b-3917-11ea-88b0-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579258448; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WAzvgb5QtA3Q71diJ/2r7MTArKvBTK8BaKDtrTl7ayg=; b=VYUVDOqqPOyu/x4dvQfaeH4hopNKrZCxTqvErM23MViinPPTLQhjKw2g RMTkfRhjUDE7s9ms6M6lJZLOEHDeIlQIgpZKR6EGazQBDWX+LAy4PIQ+v uNi1qoy4WQLbqi/gHF0d6Y0Dhq92ctvVoz0ni5gCWDJdODkcnFLC1B/rk o=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 6sR9/7VmzZNDFnO3YOvkoGmgwAjGLnTi1LSRGbjlS8ZxNlExmkjJQNi+4sU30sshurFL0Kdgs1 365IePzZr9ke4oE/XZ1FGe5brF9sEUunwbYawAQzhenZecn3LOsjlg5Cnat+T/GyUar1C+wpdN uYIqVfjhWGj1KEQXbYotCKS0mK2SWvn/rJEzIwG/QjoPpZAWheuscP5PYMC6GOcLtO2nMqjEF6 xZXPQQcr6JcNHMIM7O5pO3ecnhLwm+1s4k9mBsj5cdOp71WRME4kE1bkE7mgpS3QO3ASIJMmWh MiM= X-SBRS: 2.7 X-MesageID: 11432451 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,329,1574139600"; d="scan'208";a="11432451" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:52 +0000 Message-ID: <20200117105358.607910-7-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 06/12] xen/test/livepatch: remove include of Config.mk X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Ross Lagerwall , Konrad Rzeszutek Wilk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) livepatch/Makefile seems to only be used via Rules.mk, which already includes Config.mk, avoid the second include. Signed-off-by: Anthony PERARD Reviewed-by: Ross Lagerwall --- xen/test/livepatch/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index 82a076aac1eb..148dddb90473 100644 --- a/xen/test/livepatch/Makefile +++ b/xen/test/livepatch/Makefile @@ -1,5 +1,3 @@ -include $(XEN_ROOT)/Config.mk - ifeq ($(XEN_TARGET_ARCH),x86_64) OBJCOPY_MAGIC :=3D -I binary -O elf64-x86-64 -B i386:x86-64 endif --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579258520; cv=none; d=zohomail.com; s=zohoarc; b=lfYCWTpHW3clYdZVMgKgCGs/ygBTpTwCdBGiQaqQvsmHhIDbAfTLvdNsjgiqnq0bLYk0FJOLQTiWVR7bwsmJ6UgiK+j/KfVgr1a9u/ZKseT9MKevgPOut5//LaB0G7ulsuGW5l3DFdTxl4UZgvJVt9Ng6wTKlDZEbhDTSDFj80A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579258520; 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=xyaZ6916IRcOetIPDC4LsWPjMBrqeAqbYXR+6LgfZ+s=; b=Oq5nQ4XpCGlGxn22y6RfpqhZTmVS7djZA0/HTo+4W4exiFAhPn/G9r5H5jyOt5LQufBbMxWkHs/TezZEyer/ptt8vEIMWqf43/JcGbb1O8ieBD0H6bSXx9BWBwYI+CU2zsEFShORIkt5rVltALF/9Y4yRczFfyD+tJz5KX7+ZOM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579258520642161.62024123005835; Fri, 17 Jan 2020 02:55:20 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPGs-00054l-AZ; Fri, 17 Jan 2020 10:54:34 +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.89) (envelope-from ) id 1isPGq-00053T-Ua for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 10:54:32 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b09611b6-3917-11ea-88b0-12813bfff9fa; Fri, 17 Jan 2020 10:54:09 +0000 (UTC) X-Inumbo-ID: b09611b6-3917-11ea-88b0-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579258449; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NAP4QIGGLf6V9gS58Y3cZrTscYqqhFfgGTi2FgdQPnM=; b=TOR63abdUUZJEwYUsLf7f9i7xxFymt1V9EJmNa5MQIDANd686Dr3zOPn G9AUIU2kYX0JBG4ZZxuRfI8L0UwnSuQ2KqJabpB+avYWFKPeivf5Y/n7+ XqDqvM9VOVL+hNysfXrZnC4Y8WBhS2tGBf0o84C2cH+qDKKnnmp6wobkX w=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: Rs6S7nG5noNAalwlnrqiRrFvKGSweGb4fWchfa5+DbSqEBkWi6P5p+hQTBnupfHNBgTRCv+srr nT5vpyVf8gxVmhFwv+6Fu0TmErr2S2WcxS0zopiZLDnHCbyjiszITikArUrKg6ApbQR8gRgjUJ N6FNfzeMhgCXySZQxwL2d5bpFY6/e5Oap1KIyJQH6n+gVBeRUO2XGDIh9cL4pBZEgLugkjPXVe 9OE/wG3tedrJwNvbzqHpTLUHsrgD0hpKeM/3ounrv6mOFlKEM5W5FOgAzafOE4G3vTnQtzNRih itk= X-SBRS: 2.7 X-MesageID: 11432452 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,329,1574139600"; d="scan'208";a="11432452" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:53 +0000 Message-ID: <20200117105358.607910-8-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 07/12] xen/build: run targets csopes, tags, .. without Rules.mk X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , Anthony PERARD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Those targets make use of $(all_sources) which depends on TARGET_ARCH, so we just need to set TARGET_ARCH earlier and once. XEN_TARGET_ARCH isn't expected to change during the build, so TARGET_SUBARCH and TARGET_ARCH aren't going to change either. Set them once and for all in the Xen root Makefile. This allow to run more targets without Rules.mk. Signed-off-by: Anthony PERARD --- xen/Makefile | 25 +++++++++++++++---------- xen/Rules.mk | 5 ----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 814011175fd8..0e589de7755e 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -35,6 +35,11 @@ SRCARCH=3D$(shell echo $(ARCH) | sed -e 's/x86.*/x86/' -= e s'/arm\(32\|64\)/arm/g') # we need XEN_TARGET_ARCH to generate the proper config include $(XEN_ROOT)/Config.mk =20 +# 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') + # Allow someone to change their config file export KCONFIG_CONFIG ?=3D .config =20 @@ -46,8 +51,8 @@ dist: install =20 build install:: include/config/auto.conf =20 -.PHONY: build install uninstall clean distclean cscope TAGS tags MAP gtags= tests -build install uninstall debug clean distclean cscope TAGS tags MAP gtags t= ests:: +.PHONY: build install uninstall clean distclean MAP tests +build install uninstall debug clean distclean MAP tests:: ifneq ($(XEN_TARGET_ARCH),x86_32) $(MAKE) -f Rules.mk _$@ else @@ -220,25 +225,25 @@ endef xenversion: @echo $(XEN_FULLVERSION) =20 -.PHONY: _TAGS -_TAGS:=20 +.PHONY: TAGS +TAGS: set -e; rm -f TAGS; \ $(call set_exuberant_flags,etags); \ $(all_sources) | xargs etags $$exuberant_flags -a =20 -.PHONY: _tags -_tags:=20 +.PHONY: tags +tags: set -e; rm -f tags; \ $(call set_exuberant_flags,ctags); \ $(all_sources) | xargs ctags $$exuberant_flags -a =20 -.PHONY: _gtags -_gtags: +.PHONY: gtags +gtags: set -e; rm -f GTAGS GSYMS GPATH GRTAGS $(all_sources) | gtags -f - =20 -.PHONY: _cscope -_cscope: +.PHONY: cscope +cscope: $(all_sources) > cscope.files cscope -k -b -q =20 diff --git a/xen/Rules.mk b/xen/Rules.mk index deab0abd63e1..d20521cc9ec1 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -27,11 +27,6 @@ ifneq ($(origin verbose),undefined) $(error "You must use 'make menuconfig' to enable/disable verbose now.") endif =20 -# Set ARCH/SUBARCH appropriately. -override TARGET_SUBARCH :=3D $(XEN_TARGET_ARCH) -override TARGET_ARCH :=3D $(shell echo $(XEN_TARGET_ARCH) | \ - sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/ar= m/g') - TARGET :=3D $(BASEDIR)/xen =20 # Note that link order matters! --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579258503; cv=none; d=zohomail.com; s=zohoarc; b=Szo3CWqfTST3z5YaJo23AgFza40OeHrrMls/Lr2YD31AkQjI4A/6X7Yxa/OIfDcpaV1ko3hEB3rgPmQsChANabjH6HJPcq3ZoRka2htlcalknidN1mbDrPDQvIvAGzEfmnTlDSCDsYAUXqIJCZIUOgrRiRVJQRz5KZnOw6GC5Zo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579258503; 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=Br9RrgsFNRRU3XWrwQ/Jewp9+wMmQfrzh3zNKhZ6PFk=; b=TuZtBCGmuLXXmIqa01pCr+HcYBxAj+YvEPjy842l6jiohopGiXe1VlrUIaQMdeTHPvIOZA3Wc4XODcCtIx1lxXpGBi8qcpJOGMe6w0HY7d/6DwvMxji9cDG3vQ3WpDj1kviNHiZ8BSPIALyP8pD0qF0hsE5+y0Mwo2BxNlRiNJc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579258503000812.7919021100847; Fri, 17 Jan 2020 02:55:03 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPGm-00050g-WD; Fri, 17 Jan 2020 10:54:28 +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.89) (envelope-from ) id 1isPGl-0004zn-UK for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 10:54:27 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b09611b7-3917-11ea-88b0-12813bfff9fa; Fri, 17 Jan 2020 10:54:09 +0000 (UTC) X-Inumbo-ID: b09611b7-3917-11ea-88b0-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579258449; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iAmpS5V60ZZUaAl6culBzBWtbpVPoDXsvk/RdPpBmE4=; b=O9pLZaTU9qzpkFNz/Ur/lK5GTcDQHyMJR9qpGstarpbR+IRq9uIn3BgL Jjmjnywq9wzOpTaJzOv1urMI2nFC7JCbJHRAzEnw8sM3G/2vBU/ta+Y60 RJvSMV+/YSxRSFRrvHrVhLmVlCZuc6oSHg1LRGF7HEnAFeATYlkFe9C+t Q=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: VBXbmtHhuZOneTPoDPRc7PI4q+ogSKIZgjO3H7y6UtN40xfBWcPs6o+5bihbycwezqQ2XRPk3I gylLNUQvzM+rfhtHJArvZLcwJ5ho+JF189lLs/B4oO8cOI511KEPaLPgXuBri9BxwwlfbZr/jx 3oXbiwRgzrPr3j/r2MS3DSjYyrUZz87dXswBLZFh1WNxumbXReX7aync/2rF8TZWpUj2JcOYhP HbGT63CHG5sbur/a3tIjAAWk4HD6/q8oZuCOwViVNiUVBUbbHPhZYqGCvnbT/rzwGLz9R1IdVa +l0= X-SBRS: 2.7 X-MesageID: 11432453 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,329,1574139600"; d="scan'208";a="11432453" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:54 +0000 Message-ID: <20200117105358.607910-9-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 08/12] xen/build: make tests in test/ directly X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , Anthony PERARD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) It is unnecessary to make _tests via Rules.mk because the target use Rules.mk as well. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 0e589de7755e..5d72d82be260 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -51,8 +51,8 @@ dist: install =20 build install:: include/config/auto.conf =20 -.PHONY: build install uninstall clean distclean MAP tests -build install uninstall debug clean distclean MAP tests:: +.PHONY: build install uninstall clean distclean MAP +build install uninstall debug clean distclean MAP:: ifneq ($(XEN_TARGET_ARCH),x86_32) $(MAKE) -f Rules.mk _$@ else @@ -92,8 +92,8 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) fi; \ fi =20 -.PHONY: _tests -_tests: +.PHONY: tests +tests: $(MAKE) -f $(BASEDIR)/Rules.mk -C test tests =20 .PHONY: _uninstall --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579258519; cv=none; d=zohomail.com; s=zohoarc; b=J3X/JjBbCW+x9ybNa88J+YAGlN99SpgnEtGdr2L2gXgd1iEaS53DJvmyh/fOY8VvZV3U6o//eIkn+xoTNcS4hTbd3h+9k87y/ls3APjQC6k0+g5R715CHJ5aKxwhNkMMtM9eQwzqe2A/ndcbiMl5fhuHDSF9IhXeYIIvQ5nsPp8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579258519; 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=0o25+YWC15NtFNO//KpxRz1SSUVHpi+AbtOMTsaseE4=; b=I2ykjlO1yuxEnoxwSOf0fpDc97sKpfBfFKIYw30xvYMhdq/gBdmA6sC/+3pGHF7azYDPBlQGDUW7PorDOedxixk8pbE4T/o6Ym+Ohq3k4ZDYndVZh2YCfzPq8J5bPZS6/45bNaFG3iqIePOMEWi5RxfBgXLGHSTbACwTz6VuX04= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579258519052464.75825191765796; Fri, 17 Jan 2020 02:55:19 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPGw-00059Q-VH; Fri, 17 Jan 2020 10:54:38 +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.89) (envelope-from ) id 1isPGv-00058Y-Uc for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 10:54:37 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b09611ba-3917-11ea-88b0-12813bfff9fa; Fri, 17 Jan 2020 10:54:10 +0000 (UTC) X-Inumbo-ID: b09611ba-3917-11ea-88b0-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579258450; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LaphY/Wb0DAuUkTPlnnMYYpiHVvbGwNvxFTaKuuzcKQ=; b=LpYsv/EQeCyOaCUz5ejyNYhKqn1k1m0EOpUxsZ9EJaZvUSo6OV5+zpza k9+X3GN42PUvTzs7AAlClkW1F8/q444g8oVlCYaw3GqHoWZc8+eNuGvYS +sGLiLL0kv+XodjCN25NtCLeOinz7U7yBgPYSEJvysIPNsAWpjMjMnewv 4=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: mZ/axXkLv4mosDufcIu1sg15iqUY+GdsZPTCs6XS7F1+Ne3oGSs75wp7FDvCTqvNUSXtz6/bQ7 Zbl/RVEshULPx5XX2VXrAmESyQCEmnhVM1TtCUTkKwzcIUp36VTwzk2t8vVxQhtrQGRonyGrzZ mR0uMFXopOkDb6EQOlw3KSqrW519diKuVNhlFiPgdTth9ug3qOXpaDqy9BR5WetPuMSZYqQnRU Fg7uey6ioK8lQdayIAq7hOzozMLl9XvyC+ft40JxfQIDhj3WIimfBSgI6WBeK+FPlJDLGR7g+g sco= X-SBRS: 2.7 X-MesageID: 11432454 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,329,1574139600"; d="scan'208";a="11432454" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:55 +0000 Message-ID: <20200117105358.607910-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 09/12] xen/build: include include/config/auto.conf in main Makefile X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , Anthony PERARD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We are going to generate the CFLAGS early from "xen/Makefile" instead of in "Rules.mk", but we need to include "config/auto.conf", so include it in "Makefile". Before including "config/auto.conf" we check which make target a user is calling, as some targets don't need "auto.conf". For targets that needs auto.conf, make will generate it (and a default .config if missing). root-make-done is to avoid doing the calculation again once Rules.mk takes over and is been executed with the root Makefile. When Rules.mk is including xen/Makefile, `config-build' and `need-config' are undefined so auto.conf will not be included again (it is already included by Rules.mk) and kconfig target are out of reach of Rules.mk. The way targets are filtered is inspireds by Kbuild, with some code imported from Linux. That's why there is PHONY variable that isn't used yet, for example. Signed-off-by: Anthony PERARD --- xen/Makefile | 96 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 73 insertions(+), 23 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 5d72d82be260..80679b4a6b17 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -49,7 +49,71 @@ default: build .PHONY: dist dist: install =20 -build install:: include/config/auto.conf + +ifndef root-make-done +# section to run before calling Rules.mk, but only once. +# +# 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 + +clean-targets :=3D %clean +no-dot-config-targets :=3D $(clean-targets) \ + uninstall debug cloc \ + cscope TAGS tags MAP gtags \ + xenversion + +config-build :=3D +need-config :=3D 1 + +ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),) + ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),) + need-config :=3D + endif +endif + +ifneq ($(filter config %config,$(MAKECMDGOALS)),) + config-build :=3D 1 +endif + +export root-make-done :=3D 1 +endif # root-make-done + +ifdef config-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 +# *config targets only - make sure prerequisites are updated, and descend +# in tools/kconfig to make the *config target + +config: FORCE + $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SRCAR= CH=3D$(SRCARCH) HOSTCC=3D"$(HOSTCC)" HOSTCXX=3D"$(HOSTCXX)" $@ + +# Config.mk tries to include .config file, don't try to remake it +%/.config: ; + +%config: FORCE + $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SRCAR= CH=3D$(SRCARCH) HOSTCC=3D"$(HOSTCC)" HOSTCXX=3D"$(HOSTCXX)" $@ + +else # !config-build + +ifdef need-config +include include/config/auto.conf +# Read in dependencies to all Kconfig* files, make sure to run syncconfig = if +# changes are detected. +include include/config/auto.conf.cmd + +# Allow people to just run `make` as before and not force them to configure +$(KCONFIG_CONFIG): + $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SRCAR= CH=3D$(SRCARCH) HOSTCC=3D"$(HOSTCC)" HOSTCXX=3D"$(HOSTCXX)" defconfig + +# The actual configuration files used during the build are stored in +# include/generated/ and include/config/. Update them if .config is newer = than +# include/config/auto.conf (which mirrors .config). +# +# This exploits the 'multi-target pattern rule' trick. +# The syncconfig should be executed only once to make all the targets. +%/auto.conf %/auto.conf.cmd: $(KCONFIG_CONFIG) + $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SRCAR= CH=3D$(SRCARCH) HOSTCC=3D"$(HOSTCC)" HOSTCXX=3D"$(HOSTCXX)" syncconfig + +endif # need-config =20 .PHONY: build install uninstall clean distclean MAP build install uninstall debug clean distclean MAP:: @@ -251,9 +315,6 @@ cscope: _MAP: $(NM) -n $(TARGET)-syms | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|= \(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map =20 -.PHONY: FORCE -FORCE: - %.o %.i %.s: %.c FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) =20 @@ -274,25 +335,6 @@ $(foreach base,arch/x86/mm/guest_walk_% \ arch/x86/mm/shadow/guest_%, \ $(foreach ext,o i s,$(call build-intermediate,$(base).$(ext)))) =20 -kconfig :=3D oldconfig config menuconfig defconfig \ - nconfig xconfig gconfig savedefconfig listnewconfig olddefconfig \ - randconfig $(notdir $(wildcard arch/$(SRCARCH)/configs/*_defconfig)) -.PHONY: $(kconfig) -$(kconfig): - $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SRCAR= CH=3D$(SRCARCH) HOSTCC=3D"$(HOSTCC)" HOSTCXX=3D"$(HOSTCXX)" $@ - -include/config/%.conf: include/config/auto.conf.cmd $(KCONFIG_CONFIG) - $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SRCAR= CH=3D$(SRCARCH) HOSTCC=3D"$(HOSTCC)" HOSTCXX=3D"$(HOSTCXX)" syncconfig - -# Allow people to just run `make` as before and not force them to configure -$(KCONFIG_CONFIG): - $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SRCAR= CH=3D$(SRCARCH) HOSTCC=3D"$(HOSTCC)" HOSTCXX=3D"$(HOSTCXX)" defconfig - -# Break the dependency chain for the first run -include/config/auto.conf.cmd: ; - --include $(BASEDIR)/include/config/auto.conf.cmd - .PHONY: cloc cloc: $(eval tmpfile :=3D $(shell mktemp)) @@ -304,3 +346,11 @@ cloc: cloc --list-file=3D$(tmpfile) rm $(tmpfile) =20 +endif #config-build + +PHONY +=3D FORCE +FORCE: + +# 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) --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579259503; cv=none; d=zohomail.com; s=zohoarc; b=HXrkDVf5MmqCW3ZlRCzMWB2w1fseGsno0F0Li4TLlwdX2YzUXolWOgb2l7WYpVSgG4GztKSdqRiv0XdrDi19zFfzd3teNVtK7Ielqrq0I+BfB4ZsgfpmKyZK2QOOt9kYlDChgf2gOqrxQ1GJEe8t4Pq2Nyczqo37+nT5G+8wAEA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579259503; 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=+FWTgiE1xtpqHmrL8vtvSmasexOED8oKdZyqN3T1JtQ=; b=Hf91WIcoli15Qi6BTJA0ERAzjnZhSQ4PUNMrIOln76QflW3bGNn3TsCQaoDOnCpJ5USyanQg3EPOGW+DWwE/lFr3VgQMfjHxz9iIcTli20dsh02XBck+4gCX93slAZ79pEMmI1kV0rW3e6bxrQcs/c6GES8jnAATgssxd5+rZOQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 157925950328651.033662090677694; Fri, 17 Jan 2020 03:11:43 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPWi-0007u6-VQ; Fri, 17 Jan 2020 11:10:56 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPWg-0007tk-SY for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 11:10:54 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 01e37674-391a-11ea-9fd7-bc764e2007e4; Fri, 17 Jan 2020 11:10:45 +0000 (UTC) X-Inumbo-ID: 01e37674-391a-11ea-9fd7-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579259445; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WMMxf261yZFm98J72ZI4r5ZfmwhU0um+ejkqtC3XHBc=; b=IjqBY+6AkM7JhbKKdTwrVyGDYPMmk3QuzgzOXEx1p2oO/KalQ0hS+kpr HIo1K2hxPGlmEM+ykTGp5bExAMRcQx3JZpIBUMl0u+X1WDZYWGiQBA6ZV v9FvoP+ctg2/NN6cShDU1JnSndhjGSsERAZAyfaP17+5KAe1ZOmUZWMY+ w=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: LVVs/Owpvn3TI4Uy0zuUaNdqNqBJkLHoDNxhwzhYM2wYQqiVrX64NbioyfTY9NxtQQUS6rWY5S BU4z+7jm06iQ3Fd398ONsoTw3cVUBlDQ7jXS13Q7OXJdxq/pxKsZGcce+7nHyq8fve0gS/fheH 6H5JUbEHj2U9XiAE+qGY/ghzwbms2PxzRUirIqLWmVxdjylCVMh0wvTOJo3k6bALz3mVdZOr6I EJ9EkzFXaQ9CCw7zunWxZb3XEYkJW01JJT9W0rWTgqmYWzt8GaHR4GGAEVeUg0AiVOPK1ZbBCQ jkI= X-SBRS: 2.7 X-MesageID: 11432982 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,329,1574139600"; d="scan'208";a="11432982" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:56 +0000 Message-ID: <20200117105358.607910-11-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 10/12] xen/build: use new $(c_flags) and $(a_flags) instead of $(CFLAGS) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Anthony PERARD , Jan Beulich , Anthony PERARD , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Anthony PERARD We would like to calculate CFLAGS once and before calling Rules.mk, so the variable CFLAGS needs to have the same value across the whole build. Thus we need a new variable where some flags can change depending on the target name. Both the dependency and __OBJECT_FILE__ are such flags that change depending on the target, so there are move out of $(CFLAGS). __OBJECT_FILE__ is only used by arch/x86/mm/*.c files, so having it in $(c_flags) is enough, we don't need it in $(a_flags). This is inspired by the way Kbuild generates CFLAGS for each targets. Signed-off-by: Anthony PERARD --- xen/Rules.mk | 27 +++++++++++++++------------ xen/arch/arm/Makefile | 4 ++-- xen/arch/x86/Makefile | 6 +++--- xen/arch/x86/mm/Makefile | 6 +++--- xen/arch/x86/mm/hap/Makefile | 6 +++--- xen/arch/x86/mm/shadow/Makefile | 6 +++--- xen/include/Makefile | 2 +- 7 files changed, 30 insertions(+), 27 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index d20521cc9ec1..c98d5372f3db 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -57,7 +57,6 @@ 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-$(CONFIG_DEBUG_INFO) +=3D -g -CFLAGS +=3D '-D__OBJECT_FILE__=3D"$@"' =20 ifneq ($(CONFIG_CC_IS_CLANG),y) # Clang doesn't understand this command line argument, and doesn't appear = to @@ -70,9 +69,6 @@ AFLAGS-y +=3D -D__ASSEMBLY__ =20 ALL_OBJS :=3D $(ALL_OBJS-y) =20 -# Get gcc to generate the dependencies for us. -CFLAGS-y +=3D -MMD -MF $(@D)/.$(@F).d - CFLAGS +=3D $(CFLAGS-y) # allow extra CFLAGS externally via EXTRA_CFLAGS_XEN_CORE CFLAGS +=3D $(EXTRA_CFLAGS_XEN_CORE) @@ -141,9 +137,16 @@ endif # Always build obj-bin files as binary even if they come from C source.=20 $(obj-bin-y): CFLAGS :=3D $(filter-out -flto,$(CFLAGS)) =20 +c_flags =3D -MMD -MF $(@D)/.$(@F).d \ + $(CFLAGS) \ + '-D__OBJECT_FILE__=3D"$@"' + +a_flags =3D -MMD -MF $(@D)/.$(@F).d \ + $(AFLAGS) + built_in.o: $(obj-y) $(extra-y) ifeq ($(obj-y),) - $(CC) $(CFLAGS) -c -x c /dev/null -o $@ + $(CC) $(c_flags) -c -x c /dev/null -o $@ else ifeq ($(CONFIG_LTO),y) $(LD_LTO) -r -o $@ $(filter-out $(extra-y),$^) @@ -154,7 +157,7 @@ endif =20 built_in_bin.o: $(obj-bin-y) $(extra-y) ifeq ($(obj-bin-y),) - $(CC) $(AFLAGS) -c -x assembler /dev/null -o $@ + $(CC) $(a_flags) -c -x assembler /dev/null -o $@ else $(LD) $(LDFLAGS) -r -o $@ $(filter-out $(extra-y),$^) endif @@ -173,7 +176,7 @@ SRCPATH :=3D $(patsubst $(BASEDIR)/%,%,$(CURDIR)) =20 %.o: %.c Makefile ifeq ($(CONFIG_ENFORCE_UNIQUE_SYMBOLS),y) - $(CC) $(CFLAGS) -c $< -o $(@D)/.$(@F).tmp + $(CC) $(c_flags) -c $< -o $(@D)/.$(@F).tmp ifeq ($(CONFIG_CC_IS_CLANG),y) $(OBJCOPY) --redefine-sym $<=3D$(SRCPATH)/$< $(@D)/.$(@F).tmp $@ else @@ -181,11 +184,11 @@ else endif rm -f $(@D)/.$(@F).tmp else - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) $(c_flags) -c $< -o $@ endif =20 %.o: %.S Makefile - $(CC) $(AFLAGS) -c $< -o $@ + $(CC) $(a_flags) -c $< -o $@ =20 SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16, \ $(foreach w,1 2 4, \ @@ -206,13 +209,13 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): = %.init.o: %.o Makefile $(OBJCOPY) $(foreach s,$(SPECIAL_DATA_SECTIONS),--rename-section .$(s)=3D= .init.$(s)) $< $@ =20 %.i: %.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) $< -o $@ + $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) $< -o $@ =20 %.s: %.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -S $< -o $@ + $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ =20 # -std=3Dgnu{89,99} gets confused by # as an end-of-line comment marker %.s: %.S Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(AFLAGS)) $< -o $@ + $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) $< -o $@ =20 -include $(DEPS_INCLUDE) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 1044c2298a05..7f1427630b96 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -121,10 +121,10 @@ $(TARGET)-syms: prelink.o xen.lds rm -f $(@D)/.$(@F).[0-9]* =20 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c - $(CC) $(filter-out -flto,$(CFLAGS)) -S -o $@ $< + $(CC) $(filter-out -flto,$(c_flags)) -S -o $@ $< =20 xen.lds: xen.lds.S - $(CC) -P -E -Ui386 $(AFLAGS) -o $@ $< + $(CC) -P -E -Ui386 $(a_flags) -o $@ $< sed -e 's/xen\.lds\.o:/xen\.lds:/g' <.xen.lds.d >.xen.lds.d.new mv -f .xen.lds.d.new .xen.lds.d =20 diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 461d1f3dc2a6..472e3fadb719 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -225,7 +225,7 @@ efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.= o efi/relocs-dummy.o: $(B efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.= o: ; =20 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(BASEDIR)/include/asm-x86/= asm-macros.h - $(CC) $(filter-out -Wa$(comma)% -flto,$(CFLAGS)) -S -o $@ $< + $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -o $@ $< =20 asm-macros.i: CFLAGS +=3D -D__ASSEMBLY__ -P =20 @@ -241,12 +241,12 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i= Makefile $(call move-if-changed,$@.new,$@) =20 xen.lds: xen.lds.S - $(CC) -P -E -Ui386 $(filter-out -Wa$(comma)%,$(AFLAGS)) -o $@ $< + $(CC) -P -E -Ui386 $(filter-out -Wa$(comma)%,$(a_flags)) -o $@ $< sed -e 's/.*\.lds\.o:/$(@F):/g' <.$(@F).d >.$(@F).d.new mv -f .$(@F).d.new .$(@F).d =20 efi.lds: xen.lds.S - $(CC) -P -E -Ui386 -DEFI $(filter-out -Wa$(comma)%,$(AFLAGS)) -o $@ $< + $(CC) -P -E -Ui386 -DEFI $(filter-out -Wa$(comma)%,$(a_flags)) -o $@ $< sed -e 's/.*\.lds\.o:/$(@F):/g' <.$(@F).d >.$(@F).d.new mv -f .$(@F).d.new .$(@F).d =20 diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index d87dc0aa6eeb..a2431fde6bb4 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -12,10 +12,10 @@ obj-$(CONFIG_HVM) +=3D p2m-ept.o p2m-pod.o obj-y +=3D paging.o =20 guest_walk_%.o: guest_walk.c Makefile - $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ + $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=3D$* -c= $< -o $@ + $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ =20 guest_walk_%.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=3D$* -S = $< -o $@ + $(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 b14a9aff93d2..22e7ad54bd33 100644 --- a/xen/arch/x86/mm/hap/Makefile +++ b/xen/arch/x86/mm/hap/Makefile @@ -6,10 +6,10 @@ obj-y +=3D nested_hap.o obj-y +=3D nested_ept.o =20 guest_walk_%level.o: guest_walk.c Makefile - $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ + $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%level.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=3D$* -c= $< -o $@ + $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ =20 guest_walk_%level.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=3D$* -S = $< -o $@ + $(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 ff03a9937f9b..23d3ff10802c 100644 --- a/xen/arch/x86/mm/shadow/Makefile +++ b/xen/arch/x86/mm/shadow/Makefile @@ -7,10 +7,10 @@ obj-y +=3D none.o endif =20 guest_%.o: multi.c Makefile - $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ + $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_%.i: multi.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=3D$* -c= $< -o $@ + $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ =20 guest_%.s: multi.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=3D$* -S = $< -o $@ + $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/include/Makefile b/xen/include/Makefile index 433bad9055b2..83131c2472f5 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -64,7 +64,7 @@ compat/%.h: compat/%.i Makefile $(BASEDIR)/tools/compat-b= uild-header.py mv -f $@.new $@ =20 compat/%.i: compat/%.c Makefile - $(CPP) $(filter-out -Wa$(comma)% -M% %.d -include %/include/xen/config.h,= $(CFLAGS)) $(cppflags-y) -o $@ $< + $(CPP) $(filter-out -Wa$(comma)% -M% %.d -include %/include/xen/config.h,= $(c_flags)) $(cppflags-y) -o $@ $< =20 compat/%.c: public/%.h xlat.lst Makefile $(BASEDIR)/tools/compat-build-sou= rce.py mkdir -p $(@D) --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579259511; cv=none; d=zohomail.com; s=zohoarc; b=Rtz47dTDbwzztVwXYD7jpof7Zwy5kEMv6bIpxQQGC/nBWXFEyVG2CGhB1DvfTvrqNIaLAJCSTlsZs9QdeNqRnoawyybGlPtNuxXsDRghUlhN3TxY7Snp9pJnmNmJOjbVeeO+oSbRm4IYdoc28i2lrc+Q22YV32g5cfkNSzzjgHQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579259511; 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=vsi4+PqRgVZ9pIJHpYCuXbfHxQo0HGM/rxy68lbGYJU=; b=OZcnxI3oQI84hSEtmywBbLzuv+mXWIjUJV8koI4iWN7/aSG6uw+NnrGKXevTc/BssCS3qdYFcVsOpmXbRW4JYyHq4gXWZHVjbgcirzYIdPsZDFm7eoITCt95OZU3wwYXp2XSQVnU/SKX9K/AVD3KqwYo0uljrpjD42kFGZuTocU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579259511787951.6037403229273; Fri, 17 Jan 2020 03:11:51 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPWn-0007vj-8w; Fri, 17 Jan 2020 11:11:01 +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.89) (envelope-from ) id 1isPWm-0007v0-2X for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 11:11:00 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 07a1dba0-391a-11ea-b4d2-12813bfff9fa; Fri, 17 Jan 2020 11:10:55 +0000 (UTC) X-Inumbo-ID: 07a1dba0-391a-11ea-b4d2-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579259456; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FhooL5xAplE5fDlGtrpx8Y+IwHbT9MVN3wLm0Emh++M=; b=TT5NBwrROT1gK+F3L6EozHuQgMY2iOaNoOmpk8qizp+DyXz6cwcCbcM8 g+xxBBNa58/VU66aO/TLc3hPlViGUqUnLSFP0+jFg/4yu2t+coSG4MDbh Vtde8X1KzS3sv5I1dLIyia2gaCwyndJPBODVSJvO2jJ4Vc1HA95lbD7jz A=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: D6nNOFmv4egWRSuxL/+krWAaQz1d9vkZSEiDOG1lpoiBfhY9kpLKz1bNHRsY9wGDo5HpQSkr4n DXg8Z0VPMnraGETxYNyvsWLj0Cm+pbNptTV23eTr8KUVGnzwH/z7c6jqtoe8yjf2nmUpW+B3JR 0M++j92CKUpz/hRGFobXUduEbWl8DdAw8rMD0+RnCqZ2z+BDSEWWs/F9osgDcz9IDW+TM7e9Nc tzDG13T6iRQAlhNAOqNqFwYdcnxaa2E8fAnTv32+uWytLgj/NndJFSAjDQx5C8EV9Z0OZkeBpR c6o= X-SBRS: 2.7 X-MesageID: 11080930 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,330,1574139600"; d="scan'208";a="11080930" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:57 +0000 Message-ID: <20200117105358.607910-12-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 11/12] xen/build: introduce ccflags-y and CFLAGS_$@ X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , Anthony PERARD , Daniel De Graaf , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We are going to want $(CFLAGS) to be static and never change during the build, so introduce new variables that can be use to change the flags of a single target or of a whole directory. Those two variables are taken from Kbuild, in Linux v5.4. Signed-off-by: Anthony PERARD --- xen/Rules.mk | 7 ++++++- xen/arch/arm/efi/Makefile | 2 +- xen/arch/x86/Makefile | 6 +++--- xen/arch/x86/efi/Makefile | 2 +- xen/common/libelf/Makefile | 2 +- xen/common/libfdt/Makefile | 2 +- xen/xsm/flask/Makefile | 2 +- xen/xsm/flask/ss/Makefile | 2 +- 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index c98d5372f3db..f0111f2bc1b4 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -39,6 +39,7 @@ ALL_OBJS-$(CONFIG_CRYPTO) +=3D $(BASEDIR)/crypto/built_= in.o =20 # Initialise some variables CFLAGS_UBSAN :=3D +ccflags-y :=3D =20 ifeq ($(CONFIG_DEBUG),y) CFLAGS +=3D -O1 @@ -137,9 +138,13 @@ endif # Always build obj-bin files as binary even if they come from C source.=20 $(obj-bin-y): CFLAGS :=3D $(filter-out -flto,$(CFLAGS)) =20 +# target with its suffix stripped +target-stem =3D $(basename $@) + c_flags =3D -MMD -MF $(@D)/.$(@F).d \ $(CFLAGS) \ - '-D__OBJECT_FILE__=3D"$@"' + '-D__OBJECT_FILE__=3D"$@"' \ + $(ccflags-y) $(CFLAGS_$(target-stem).o) =20 a_flags =3D -MMD -MF $(@D)/.$(@F).d \ $(AFLAGS) diff --git a/xen/arch/arm/efi/Makefile b/xen/arch/arm/efi/Makefile index d34c9168914a..e4aaba3e074b 100644 --- a/xen/arch/arm/efi/Makefile +++ b/xen/arch/arm/efi/Makefile @@ -1,4 +1,4 @@ -CFLAGS +=3D -fshort-wchar +ccflags-y +=3D -fshort-wchar =20 obj-y +=3D boot.init.o runtime.o obj-$(CONFIG_ACPI) +=3D efi-dom0.init.o diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 472e3fadb719..acf4c145c896 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -174,14 +174,14 @@ EFI_LDFLAGS +=3D --major-subsystem-version=3D2 --mino= r-subsystem-version=3D0 export XEN_BUILD_EFI :=3D $(shell $(CC) $(filter-out $(CFLAGS-y) .%.d,$(CF= LAGS)) -c efi/check.c -o efi/check.o 2>/dev/null && echo y) # Check if the linker supports PE. XEN_BUILD_PE :=3D $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsyste= m=3D10 -o efi/check.efi efi/check.o 2>/dev/null && echo y)) -CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI +ccflags-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI =20 $(TARGET).efi: VIRT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n '= s, A VIRT_START$$,,p') $(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's= , A ALT_START$$,,p') =20 ifneq ($(build_id_linker),) ifeq ($(call ld-ver-build-id,$(LD) $(filter -m%,$(EFI_LDFLAGS))),y) -CFLAGS +=3D -DBUILD_ID_EFI +ccflags-y +=3D -DBUILD_ID_EFI EFI_LDFLAGS +=3D $(build_id_linker) note_file :=3D efi/buildid.o # NB: this must be the last input in the linker call, because inputs follo= wing @@ -227,7 +227,7 @@ efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.= o efi/relocs-dummy.o: ; asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(BASEDIR)/include/asm-x86/= asm-macros.h $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -o $@ $< =20 -asm-macros.i: CFLAGS +=3D -D__ASSEMBLY__ -P +CFLAGS_asm-macros.o +=3D -D__ASSEMBLY__ -P =20 $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i Makefile echo '#if 0' >$@.new diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile index 4bc0a196e9ca..2cbb3de3a8ab 100644 --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -1,4 +1,4 @@ -CFLAGS +=3D -fshort-wchar +ccflags-y +=3D -fshort-wchar =20 %.o: %.ihex $(OBJCOPY) -I ihex -O binary $< $@ diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile index 3d9e38f27e65..9a433f01fbd4 100644 --- a/xen/common/libelf/Makefile +++ b/xen/common/libelf/Makefile @@ -3,7 +3,7 @@ nocov-y +=3D libelf.o =20 SECTIONS :=3D text data $(SPECIAL_DATA_SECTIONS) =20 -CFLAGS +=3D -Wno-pointer-sign +ccflags-y +=3D -Wno-pointer-sign =20 libelf.o: libelf-temp.o Makefile $(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$(s)) $= < $@ diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile index c075bbf5462a..9ea5c696d52a 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -5,7 +5,7 @@ SECTIONS :=3D text data $(SPECIAL_DATA_SECTIONS) obj-y +=3D libfdt.o nocov-y +=3D libfdt.o =20 -CFLAGS +=3D -I$(BASEDIR)/include/xen/libfdt/ +ccflags-y +=3D -I$(BASEDIR)/include/xen/libfdt/ =20 libfdt.o: libfdt-temp.o Makefile $(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$(s)) $= < $@ diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index b1fd45421993..3bf0a6fa0456 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -4,7 +4,7 @@ obj-y +=3D flask_op.o =20 obj-y +=3D ss/ =20 -CFLAGS +=3D -I./include +ccflags-y +=3D -I./include =20 AWK =3D awk =20 diff --git a/xen/xsm/flask/ss/Makefile b/xen/xsm/flask/ss/Makefile index 046ce8f53326..30f910a9c9c1 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 +=3D -I../include +ccflags-y +=3D -I../include --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579259508; cv=none; d=zohomail.com; s=zohoarc; b=gcdVwQR4e78zarQ30sMH8+VKnQxbmenSm5I0ktdXVjUU9gdr22HHFwfUDF2ME+OwWh+lyEAZbdGnruPev3lLGG/BKF+R/75ygTrLytAi3yq3u+pWahQ2iC3wXIJUocHRB3cxpo5He9/eG6xcgr3TQtFPxRZRXBHZ2zxNkEJWWg0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579259508; 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=oZW0LwdnFj2ioSxfZ/XFo2nLLTwyWS/KgNe7DgYrDjE=; b=UL81VT28DiMRpRL4JbndicKSpmaDKpFNhQmQHKUfcdJcisewPK/L3qfORGwvX835S6EjJblwHumdTKVm8JgQxI9c5NLBml0lPXDp8shll39/CerGzoUi/Q1PinJstS37QdJ/3OQO0rBYIcne13h55uuI6z9kqf49RkwEOm6+TIM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579259508719395.65010669927415; Fri, 17 Jan 2020 03:11:48 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isPWe-0007sx-Fu; Fri, 17 Jan 2020 11:10:52 +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.89) (envelope-from ) id 1isPWd-0007ss-2y for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 11:10:51 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 02c105fd-391a-11ea-b4d2-12813bfff9fa; Fri, 17 Jan 2020 11:10:47 +0000 (UTC) X-Inumbo-ID: 02c105fd-391a-11ea-b4d2-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579259446; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wn7Ss2pa9Hk1UFN+LeTRRwICRl7+9D3CuFTJ6p2nF3s=; b=UDzM/8vgrlgEa6bM08FGrqS9ivpVh8GAfTsp8drlozExqxp25IKcIL/0 iDgboiKBNWbKi/uNtpRQ5rj2SjjybfZz2gAohg74FsMkjgP5BMusCpnPf pqjKJoH0Hg81x/xBFICayNp27VSkLPnnCvDktJ11NPzQ3O6eLogblKUT1 s=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: tyEHTKZAvsglgD6q+NufYUhofc+NqL3XVD0xrq9uZyXhKMwNk7/bP+Zchv5DODnnMCrfu3RdBB aZtBFod28eQCASx6wVMf/xP0ZT2dYoMMw/9C6Pxm7kGiImEj0QGwFy8nvGpxywluCIYpI3uSUe oZZkNZNO+cTOKxPth+HWNBeJsNuXCYUDcrWvWUb1KPhYAZ/dFQdD2B8KN9DyogcWgLMp9dz2Rx +C1InQbycHfH9d2111VCpSILkdxygu0/ijqOxFelYG8Cyw6FXxUX0/haDbFZMvg4HzAFf1A44B FyM= X-SBRS: 2.7 X-MesageID: 11661073 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,329,1574139600"; d="scan'208";a="11661073" From: Anthony PERARD To: Date: Fri, 17 Jan 2020 10:53:58 +0000 Message-ID: <20200117105358.607910-13-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 12/12] xen/build: have the root Makefile generates the CFLAGS X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , Anthony PERARD , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Instead of generating the CFLAGS in Rules.mk everytime we enter a new subdirectory, we are going to generate most of them a single time, and export the result in the environment so that Rules.mk can use it. The only flags left to generates are the one that depends on the targets, but the variable $(c_flags) takes care of that. Arch specific CFLAGS are generated by a new file "arch/*/arch.mk" which is included by the root Makefile. In order to allow some variable that are specific to one arch and needs to be regenerated for each target, there's a new variable $(arch_ccflags). When running Rules.mk in the root directory (xen/), the variable `root-make-done' is set, so `need-config' will remain undef and so the root Makefile will not generate the cflags again. There is on FIXME added about LTO build, but since LTO is marked as BROKEN, this commit doesn't attempt to filter -flto flags out of the CFLAGS. Signed-off-by: Anthony PERARD --- xen/Makefile | 70 ++++++++++++++++++++++++++++ xen/Rules.mk | 70 +++++----------------------- xen/arch/arm/Makefile | 10 ++-- xen/arch/arm/Rules.mk | 93 -------------------------------------- xen/arch/arm/arch.mk | 88 ++++++++++++++++++++++++++++++++++++ xen/arch/x86/Makefile | 16 +++---- xen/arch/x86/Rules.mk | 91 +++---------------------------------- xen/arch/x86/arch.mk | 87 +++++++++++++++++++++++++++++++++++ xen/common/libelf/Makefile | 2 +- xen/common/libfdt/Makefile | 2 +- 10 files changed, 278 insertions(+), 251 deletions(-) create mode 100644 xen/arch/arm/arch.mk create mode 100644 xen/arch/x86/arch.mk diff --git a/xen/Makefile b/xen/Makefile index 80679b4a6b17..22ca963994c8 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -113,6 +113,76 @@ $(KCONFIG_CONFIG): %/auto.conf %/auto.conf.cmd: $(KCONFIG_CONFIG) $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SRCAR= CH=3D$(SRCARCH) HOSTCC=3D"$(HOSTCC)" HOSTCXX=3D"$(HOSTCXX)" syncconfig =20 +ifeq ($(CONFIG_DEBUG),y) +CFLAGS +=3D -O1 +else +CFLAGS +=3D -O2 +endif + +ifeq ($(CONFIG_FRAME_POINTER),y) +CFLAGS +=3D -fno-omit-frame-pointer +else +CFLAGS +=3D -fomit-frame-pointer +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-$(CONFIG_DEBUG_INFO) +=3D -g + +ifneq ($(CONFIG_CC_IS_CLANG),y) +# Clang doesn't understand this command line argument, and doesn't appear = to +# have an suitable alternative. The resulting compiled binary does functi= on, +# but has an excessively large symbol table. +CFLAGS +=3D -Wa,--strip-local-absolute +endif + +AFLAGS-y +=3D -D__ASSEMBLY__ + +CFLAGS +=3D $(CFLAGS-y) +# allow extra CFLAGS externally via EXTRA_CFLAGS_XEN_CORE +CFLAGS +=3D $(EXTRA_CFLAGS_XEN_CORE) + +# Most CFLAGS are safe for assembly files: +# -std=3Dgnu{89,99} gets confused by #-prefixed end-of-line comments +# -flto makes no sense and annoys clang +AFLAGS +=3D $(AFLAGS-y) $(filter-out -std=3Dgnu% -flto,$(CFLAGS)) + +# LDFLAGS are only passed directly to $(LD) +LDFLAGS +=3D $(LDFLAGS_DIRECT) + +LDFLAGS +=3D $(LDFLAGS-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 +else +COV_FLAGS :=3D +endif + +ifeq ($(CONFIG_UBSAN),y) +CFLAGS_UBSAN :=3D -fsanitize=3Dundefined +else +CFLAGS_UBSAN :=3D +endif + +ifeq ($(CONFIG_LTO),y) +CFLAGS +=3D -flto +LDFLAGS-$(CONFIG_CC_IS_CLANG) +=3D -plugin LLVMgold.so +endif + +include $(BASEDIR)/arch/$(TARGET_ARCH)/arch.mk + +# define new variables to avoid the ones defines in Config.mk +export XEN_CFLAGS :=3D $(CFLAGS) +export XEN_AFLAGS :=3D $(AFLAGS) +export XEN_LDFLAGS :=3D $(LDFLAGS) +export COV_FLAGS CFLAGS_UBSAN + endif # need-config =20 .PHONY: build install uninstall clean distclean MAP diff --git a/xen/Rules.mk b/xen/Rules.mk index f0111f2bc1b4..faf462a0178a 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -38,52 +38,12 @@ ALL_OBJS-y +=3D $(BASEDIR)/arch/$(TARGET_= ARCH)/built_in.o ALL_OBJS-$(CONFIG_CRYPTO) +=3D $(BASEDIR)/crypto/built_in.o =20 # Initialise some variables -CFLAGS_UBSAN :=3D ccflags-y :=3D - -ifeq ($(CONFIG_DEBUG),y) -CFLAGS +=3D -O1 -else -CFLAGS +=3D -O2 -endif - -ifeq ($(CONFIG_FRAME_POINTER),y) -CFLAGS +=3D -fno-omit-frame-pointer -else -CFLAGS +=3D -fomit-frame-pointer -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-$(CONFIG_DEBUG_INFO) +=3D -g - -ifneq ($(CONFIG_CC_IS_CLANG),y) -# Clang doesn't understand this command line argument, and doesn't appear = to -# have an suitable alternative. The resulting compiled binary does functi= on, -# but has an excessively large symbol table. -CFLAGS +=3D -Wa,--strip-local-absolute -endif - -AFLAGS-y +=3D -D__ASSEMBLY__ +# Allow arch specific cflags, to be calculated for each objects. +arch_ccflags =3D =20 ALL_OBJS :=3D $(ALL_OBJS-y) =20 -CFLAGS +=3D $(CFLAGS-y) -# allow extra CFLAGS externally via EXTRA_CFLAGS_XEN_CORE -CFLAGS +=3D $(EXTRA_CFLAGS_XEN_CORE) - -# Most CFLAGS are safe for assembly files: -# -std=3Dgnu{89,99} gets confused by #-prefixed end-of-line comments -# -flto makes no sense and annoys clang -AFLAGS +=3D $(AFLAGS-y) $(filter-out -std=3Dgnu% -flto,$(CFLAGS)) - -# LDFLAGS are only passed directly to $(LD) -LDFLAGS +=3D $(LDFLAGS_DIRECT) - -LDFLAGS +=3D $(LDFLAGS-y) - include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk =20 include Makefile @@ -103,27 +63,19 @@ __subdir-y :=3D $(filter %/, $(obj-y)) subdir-y +=3D $(__subdir-y) obj-y :=3D $(patsubst %/, %/built_in.o, $(obj-y)) =20 -$(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS +=3D -DINIT_SE= CTIONS_ONLY +$(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): ccflags-y +=3D -DINIT= _SECTIONS_ONLY =20 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= +=3D $(COV_FLAGS) +$(filter-out %.init.o $(nocov-y),$(obj-y) $(obj-bin-y) $(extra-y)): ccflag= s-y +=3D $(COV_FLAGS) endif =20 ifeq ($(CONFIG_UBSAN),y) -CFLAGS_UBSAN +=3D -fsanitize=3Dundefined # 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 +=3D $(filter-out -fno-%,$(CFLAGS_UBSAN)) $(filter -fno-%,$(CFLAGS_= UBSAN)) +ccflags-y +=3D $(filter-out -fno-%,$(CFLAGS_UBSAN)) $(filter -fno-%,$(CFLA= GS_UBSAN)) endif =20 ifeq ($(CONFIG_LTO),y) -CFLAGS +=3D -flto -LDFLAGS-$(CONFIG_CC_IS_CLANG) +=3D -plugin LLVMgold.so # Would like to handle all object files as bitcode, but objects made from # pure asm are in a different format and have to be collected separately. # Mirror the directory tree, collecting them as built_in_bin.o. @@ -136,18 +88,20 @@ obj-bin-y :=3D endif =20 # Always build obj-bin files as binary even if they come from C source.=20 -$(obj-bin-y): CFLAGS :=3D $(filter-out -flto,$(CFLAGS)) +# FIXME LTO broken, but we would need a different way to filter -flto out +# $(obj-bin-y): CFLAGS :=3D $(filter-out -flto,$(CFLAGS)) =20 # target with its suffix stripped target-stem =3D $(basename $@) =20 c_flags =3D -MMD -MF $(@D)/.$(@F).d \ - $(CFLAGS) \ + $(XEN_CFLAGS) \ + $(arch_ccflags) \ '-D__OBJECT_FILE__=3D"$@"' \ $(ccflags-y) $(CFLAGS_$(target-stem).o) =20 a_flags =3D -MMD -MF $(@D)/.$(@F).d \ - $(AFLAGS) + $(XEN_AFLAGS) =20 built_in.o: $(obj-y) $(extra-y) ifeq ($(obj-y),) @@ -156,7 +110,7 @@ else ifeq ($(CONFIG_LTO),y) $(LD_LTO) -r -o $@ $(filter-out $(extra-y),$^) else - $(LD) $(LDFLAGS) -r -o $@ $(filter-out $(extra-y),$^) + $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out $(extra-y),$^) endif endif =20 @@ -164,7 +118,7 @@ built_in_bin.o: $(obj-bin-y) $(extra-y) ifeq ($(obj-bin-y),) $(CC) $(a_flags) -c -x assembler /dev/null -o $@ else - $(LD) $(LDFLAGS) -r -o $@ $(filter-out $(extra-y),$^) + $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out $(extra-y),$^) endif =20 # Force execution of pattern rules (for which PHONY cannot be directly use= d). diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 7f1427630b96..1599e2ba4058 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -96,24 +96,24 @@ prelink_lto.o: $(ALL_OBJS) =20 # Link it with all the binary objects prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o - $(LD) $(LDFLAGS) -r -o $@ $^ + $(LD) $(XEN_LDFLAGS) -r -o $@ $^ else prelink.o: $(ALL_OBJS) - $(LD) $(LDFLAGS) -r -o $@ $^ + $(LD) $(XEN_LDFLAGS) -r -o $@ $^ endif =20 $(TARGET)-syms: prelink.o xen.lds - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o \ $(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) $(LDFLAGS) -T xen.lds -N prelink.o \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o \ $(@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) $(LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --xensyms --sysv --sort \ diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk index 022a3a6f82ba..e69de29bb2d1 100644 --- a/xen/arch/arm/Rules.mk +++ b/xen/arch/arm/Rules.mk @@ -1,93 +0,0 @@ -######################################## -# arm-specific definitions - -# -# If you change any of these configuration options then you must -# 'make clean' before rebuilding. -# - -CFLAGS +=3D -I$(BASEDIR)/include - -$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) -$(call cc-option-add,CFLAGS,CC,-Wnested-externs) - -# Prevent floating-point variables from creeping into Xen. -CFLAGS-$(CONFIG_ARM_32) +=3D -msoft-float -CFLAGS-$(CONFIG_ARM_32) +=3D -mcpu=3Dcortex-a15 - -CFLAGS-$(CONFIG_ARM_64) +=3D -mcpu=3Dgeneric -CFLAGS-$(CONFIG_ARM_64) +=3D -mgeneral-regs-only # No fp registers etc - -EARLY_PRINTK :=3D n - -ifeq ($(CONFIG_DEBUG),y) - -# See docs/misc/arm/early-printk.txt for syntax - -EARLY_PRINTK_brcm :=3D 8250,0xF040AB00,2 -EARLY_PRINTK_dra7 :=3D 8250,0x4806A000,2 -EARLY_PRINTK_fastmodel :=3D pl011,0x1c090000,115200 -EARLY_PRINTK_exynos5250 :=3D exynos4210,0x12c20000 -EARLY_PRINTK_hikey960 :=3D pl011,0xfff32000 -EARLY_PRINTK_juno :=3D pl011,0x7ff80000 -EARLY_PRINTK_lager :=3D scif,0xe6e60000 -EARLY_PRINTK_midway :=3D pl011,0xfff36000 -EARLY_PRINTK_mvebu :=3D mvebu,0xd0012000 -EARLY_PRINTK_omap5432 :=3D 8250,0x48020000,2 -EARLY_PRINTK_rcar3 :=3D scif,0xe6e88000 -EARLY_PRINTK_seattle :=3D pl011,0xe1010000 -EARLY_PRINTK_sun6i :=3D 8250,0x01c28000,2 -EARLY_PRINTK_sun7i :=3D 8250,0x01c28000,2 -EARLY_PRINTK_thunderx :=3D pl011,0x87e024000000 -EARLY_PRINTK_vexpress :=3D pl011,0x1c090000 -EARLY_PRINTK_xgene-mcdivitt :=3D 8250,0x1c021000,2 -EARLY_PRINTK_xgene-storm :=3D 8250,0x1c020000,2 -EARLY_PRINTK_zynqmp :=3D cadence,0xff000000 - -ifneq ($(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK)),) -EARLY_PRINTK_CFG :=3D $(subst $(comma), ,$(EARLY_PRINTK_$(CONFIG_EARLY_PRI= NTK))) -else -EARLY_PRINTK_CFG :=3D $(subst $(comma), ,$(CONFIG_EARLY_PRINTK)) -endif - -# Extract configuration from string -EARLY_PRINTK_INC :=3D $(word 1,$(EARLY_PRINTK_CFG)) -EARLY_UART_BASE_ADDRESS :=3D $(word 2,$(EARLY_PRINTK_CFG)) - -# UART specific options -ifeq ($(EARLY_PRINTK_INC),8250) -EARLY_UART_REG_SHIFT :=3D $(word 3,$(EARLY_PRINTK_CFG)) -endif -ifeq ($(EARLY_PRINTK_INC),pl011) -ifneq ($(word 3,$(EARLY_PRINTK_CFG)),) -EARLY_PRINTK_INIT_UART :=3D y -EARLY_PRINTK_BAUD :=3D $(word 3,$(EARLY_PRINTK_CFG)) -endif -endif -ifeq ($(EARLY_PRINTK_INC),scif) -ifneq ($(word 3,$(EARLY_PRINTK_CFG)),) -CFLAGS-y +=3D -DEARLY_PRINTK_VERSION_$(word 3,$(EARLY_PRINTK_CFG)) -else -CFLAGS-y +=3D -DEARLY_PRINTK_VERSION_NONE -endif -endif - -ifneq ($(EARLY_PRINTK_INC),) -EARLY_PRINTK :=3D y -endif - -CFLAGS-$(EARLY_PRINTK) +=3D -DCONFIG_EARLY_PRINTK -CFLAGS-$(EARLY_PRINTK_INIT_UART) +=3D -DEARLY_PRINTK_INIT_UART -CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_PRINTK_INC=3D\"debug-$(EARLY_PRINTK_IN= C).inc\" -CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_PRINTK_BAUD=3D$(EARLY_PRINTK_BAUD) -CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_UART_BASE_ADDRESS=3D$(EARLY_UART_BASE_= ADDRESS) -CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_UART_REG_SHIFT=3D$(EARLY_UART_REG_SHIF= T) - -else # !CONFIG_DEBUG - -ifneq ($(CONFIG_EARLY_PRINTK),) -# Early printk is dependant on a debug build. -$(error CONFIG_EARLY_PRINTK enabled for non-debug build) -endif - -endif diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk new file mode 100644 index 000000000000..296d6c6cf526 --- /dev/null +++ b/xen/arch/arm/arch.mk @@ -0,0 +1,88 @@ +######################################## +# arm-specific definitions + +CFLAGS +=3D -I$(BASEDIR)/include + +$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) +$(call cc-option-add,CFLAGS,CC,-Wnested-externs) + +# Prevent floating-point variables from creeping into Xen. +CFLAGS-$(CONFIG_ARM_32) +=3D -msoft-float +CFLAGS-$(CONFIG_ARM_32) +=3D -mcpu=3Dcortex-a15 + +CFLAGS-$(CONFIG_ARM_64) +=3D -mcpu=3Dgeneric +CFLAGS-$(CONFIG_ARM_64) +=3D -mgeneral-regs-only # No fp registers etc + +EARLY_PRINTK :=3D n + +ifeq ($(CONFIG_DEBUG),y) + +# See docs/misc/arm/early-printk.txt for syntax + +EARLY_PRINTK_brcm :=3D 8250,0xF040AB00,2 +EARLY_PRINTK_dra7 :=3D 8250,0x4806A000,2 +EARLY_PRINTK_fastmodel :=3D pl011,0x1c090000,115200 +EARLY_PRINTK_exynos5250 :=3D exynos4210,0x12c20000 +EARLY_PRINTK_hikey960 :=3D pl011,0xfff32000 +EARLY_PRINTK_juno :=3D pl011,0x7ff80000 +EARLY_PRINTK_lager :=3D scif,0xe6e60000 +EARLY_PRINTK_midway :=3D pl011,0xfff36000 +EARLY_PRINTK_mvebu :=3D mvebu,0xd0012000 +EARLY_PRINTK_omap5432 :=3D 8250,0x48020000,2 +EARLY_PRINTK_rcar3 :=3D scif,0xe6e88000 +EARLY_PRINTK_seattle :=3D pl011,0xe1010000 +EARLY_PRINTK_sun6i :=3D 8250,0x01c28000,2 +EARLY_PRINTK_sun7i :=3D 8250,0x01c28000,2 +EARLY_PRINTK_thunderx :=3D pl011,0x87e024000000 +EARLY_PRINTK_vexpress :=3D pl011,0x1c090000 +EARLY_PRINTK_xgene-mcdivitt :=3D 8250,0x1c021000,2 +EARLY_PRINTK_xgene-storm :=3D 8250,0x1c020000,2 +EARLY_PRINTK_zynqmp :=3D cadence,0xff000000 + +ifneq ($(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK)),) +EARLY_PRINTK_CFG :=3D $(subst $(comma), ,$(EARLY_PRINTK_$(CONFIG_EARLY_PRI= NTK))) +else +EARLY_PRINTK_CFG :=3D $(subst $(comma), ,$(CONFIG_EARLY_PRINTK)) +endif + +# Extract configuration from string +EARLY_PRINTK_INC :=3D $(word 1,$(EARLY_PRINTK_CFG)) +EARLY_UART_BASE_ADDRESS :=3D $(word 2,$(EARLY_PRINTK_CFG)) + +# UART specific options +ifeq ($(EARLY_PRINTK_INC),8250) +EARLY_UART_REG_SHIFT :=3D $(word 3,$(EARLY_PRINTK_CFG)) +endif +ifeq ($(EARLY_PRINTK_INC),pl011) +ifneq ($(word 3,$(EARLY_PRINTK_CFG)),) +EARLY_PRINTK_INIT_UART :=3D y +EARLY_PRINTK_BAUD :=3D $(word 3,$(EARLY_PRINTK_CFG)) +endif +endif +ifeq ($(EARLY_PRINTK_INC),scif) +ifneq ($(word 3,$(EARLY_PRINTK_CFG)),) +CFLAGS-y +=3D -DEARLY_PRINTK_VERSION_$(word 3,$(EARLY_PRINTK_CFG)) +else +CFLAGS-y +=3D -DEARLY_PRINTK_VERSION_NONE +endif +endif + +ifneq ($(EARLY_PRINTK_INC),) +EARLY_PRINTK :=3D y +endif + +CFLAGS-$(EARLY_PRINTK) +=3D -DCONFIG_EARLY_PRINTK +CFLAGS-$(EARLY_PRINTK_INIT_UART) +=3D -DEARLY_PRINTK_INIT_UART +CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_PRINTK_INC=3D\"debug-$(EARLY_PRINTK_IN= C).inc\" +CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_PRINTK_BAUD=3D$(EARLY_PRINTK_BAUD) +CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_UART_BASE_ADDRESS=3D$(EARLY_UART_BASE_= ADDRESS) +CFLAGS-$(EARLY_PRINTK) +=3D -DEARLY_UART_REG_SHIFT=3D$(EARLY_UART_REG_SHIF= T) + +else # !CONFIG_DEBUG + +ifneq ($(CONFIG_EARLY_PRINTK),) +# Early printk is dependant on a debug build. +$(error CONFIG_EARLY_PRINTK enabled for non-debug build) +endif + +endif diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index acf4c145c896..6724572eb84b 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -124,32 +124,32 @@ prelink-efi_lto.o: $(ALL_OBJS) efi/runtime.o efi/comp= at.o =20 # Link it with all the binary objects prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o - $(LD) $(LDFLAGS) -r -o $@ $^ + $(LD) $(XEN_LDFLAGS) -r -o $@ $^ =20 prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) preli= nk-efi_lto.o efi/boot.init.o - $(LD) $(LDFLAGS) -r -o $@ $^ + $(LD) $(XEN_LDFLAGS) -r -o $@ $^ else prelink.o: $(ALL_OBJS) - $(LD) $(LDFLAGS) -r -o $@ $^ + $(LD) $(XEN_LDFLAGS) -r -o $@ $^ =20 prelink-efi.o: $(ALL_OBJS) efi/boot.init.o efi/runtime.o efi/compat.o - $(LD) $(LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^) + $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^) endif =20 $(TARGET)-syms: prelink.o xen.lds - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(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) $(LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(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) $(LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --xensyms --sysv --sort \ @@ -162,7 +162,7 @@ note.o: $(TARGET)-syms --rename-section=3D.data=3D.note.gnu.build-id -S $@.bin $@ rm -f $@.bin =20 -EFI_LDFLAGS =3D $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=3D10 +EFI_LDFLAGS =3D $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=3D10 EFI_LDFLAGS +=3D --image-base=3D$(1) --stack=3D0,0 --heap=3D0,0 --strip-de= bug EFI_LDFLAGS +=3D --section-alignment=3D0x200000 --file-alignment=3D0x20 EFI_LDFLAGS +=3D --major-image-version=3D$(XEN_VERSION) diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index e69b8e697cc0..7867f9ccef83 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -1,89 +1,10 @@ ######################################## # x86-specific definitions =20 -XEN_IMG_OFFSET :=3D 0x200000 - -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 -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) -CFLAGS +=3D '-D__OBJECT_LABEL__=3D$(subst /,$$,$(subst -,_,$(subst $(BASED= IR)/,,$(CURDIR))/$@))' - -# Prevent floating-point variables from creeping into Xen. -CFLAGS +=3D -msoft-float - -ifeq ($(CONFIG_CC_IS_CLANG),y) -# Note: Any test which adds -no-integrated-as will cause subsequent tests = to -# succeed, and not trigger further additions. -# -# The tests to select whether the integrated assembler is usable need to h= appen -# before testing any assembler features, or else the result of the tests w= ould -# be stale if the integrated assembler is not used. - -# Older clang's built-in assembler doesn't understand .skip with labels: -# https://bugs.llvm.org/show_bug.cgi?id=3D27369 -$(call as-option-add,CFLAGS,CC,".L0: .L1: .skip (.L1 - .L0)",,\ - -no-integrated-as) - -# Check whether clang asm()-s support .include. -$(call as-option-add,CFLAGS,CC,".include \"asm/indirect_thunk_asm.h\"",,\ - -no-integrated-as) - -# Check whether clang keeps .macro-s between asm()-s: -# https://bugs.llvm.org/show_bug.cgi?id=3D36110 -$(call as-option-add,CFLAGS,CC,\ - ".macro FOO;.endm"$$(close); asm volatile $$(open)".m= acro FOO;.endm",\ - -no-integrated-as) -endif - -$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) -$(call cc-option-add,CFLAGS,CC,-Wnested-externs) -$(call as-option-add,CFLAGS,CC,"vmcall",-DHAVE_AS_VMX) -$(call as-option-add,CFLAGS,CC,"crc32 %eax$$(comma)%eax",-DHAVE_AS_SSE4_2) -$(call as-option-add,CFLAGS,CC,"invept (%rax)$$(comma)%rax",-DHAVE_AS_EPT) -$(call as-option-add,CFLAGS,CC,"rdrand %eax",-DHAVE_AS_RDRAND) -$(call as-option-add,CFLAGS,CC,"rdfsbase %rax",-DHAVE_AS_FSGSBASE) -$(call as-option-add,CFLAGS,CC,"xsaveopt (%rax)",-DHAVE_AS_XSAVEOPT) -$(call as-option-add,CFLAGS,CC,"rdseed %eax",-DHAVE_AS_RDSEED) -$(call as-option-add,CFLAGS,CC,"clwb (%rax)",-DHAVE_AS_CLWB) -$(call as-option-add,CFLAGS,CC,".equ \"x\"$$(comma)1", \ - -U__OBJECT_LABEL__ -DHAVE_AS_QUOTED_SYM \ - '-D__OBJECT_LABEL__=3D$(subst $(BASEDIR)/,,$(CURDIR))= /$$@') -$(call as-option-add,CFLAGS,CC,"invpcid (%rax)$$(comma)%rax",-DHAVE_AS_INV= PCID) - -# GAS's idea of true is -1. Clang's idea is 1 -$(call as-option-add,CFLAGS,CC,\ - ".if ((1 > 0) < 0); .error \"\";.endif",,-DHAVE_AS_NEGATIVE_TRUE) - -# Check to see whether the assmbler supports the .nop directive. -$(call as-option-add,CFLAGS,CC,\ - ".L1: .L2: .nops (.L2 - .L1)$$(comma)9",-DHAVE_AS_NOPS_DIRECTIVE) - -CFLAGS +=3D -mno-red-zone -fpic -fno-asynchronous-unwind-tables - -# Xen doesn't use SSE interally. If the compiler supports it, also skip t= he -# SSE setup for variadic function calls. -CFLAGS +=3D -mno-sse $(call cc-option,$(CC),-mskip-rax-setup) - -# Compile with thunk-extern, indirect-branch-register if avaiable. -ifeq ($(CONFIG_INDIRECT_THUNK),y) -CFLAGS +=3D -mindirect-branch=3Dthunk-extern -mindirect-branch-register -CFLAGS +=3D -fno-jump-tables +ifdef HAVE_AS_QUOTED_SYM +arch_ccflags +=3D -DHAVE_AS_QUOTED_SYM \ + '-D__OBJECT_LABEL__=3D$(subst $(BASEDIR)/,,$(CURDIR))/$@' +else +arch_ccflags +=3D '-D__OBJECT_LABEL__=3D$(subst /,$$,$(subst -,_,$(subst $= (BASEDIR)/,,$(CURDIR))/$@))' endif - -# If supported by the compiler, reduce stack alignment to 8 bytes. But all= ow -# this to be overridden elsewhere. -$(call cc-option-add,CFLAGS-stack-boundary,CC,-mpreferred-stack-boundary= =3D3) -CFLAGS +=3D $(CFLAGS-stack-boundary) - -ifeq ($(CONFIG_UBSAN),y) -# Don't enable alignment sanitisation. x86 has efficient unaligned access= es, -# and various things (ACPI tables, hypercall pages, stubs, etc) are wont-f= ix. -# It also causes an as-yet-unidentified crash on native boot before the -# console starts. -$(call cc-option-add,CFLAGS_UBSAN,CC,-fno-sanitize=3Dalignment) -endif - -# Set up the assembler include path properly for older toolchains. -CFLAGS +=3D -Wa,-I$(BASEDIR)/include - +arch_ccflags +=3D $(CFLAGS-stack-boundary) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk new file mode 100644 index 000000000000..1073f6cc99e9 --- /dev/null +++ b/xen/arch/x86/arch.mk @@ -0,0 +1,87 @@ +######################################## +# x86-specific definitions + +export XEN_IMG_OFFSET :=3D 0x200000 + +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 -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) + +# Prevent floating-point variables from creeping into Xen. +CFLAGS +=3D -msoft-float + +ifeq ($(CONFIG_CC_IS_CLANG),y) +# Note: Any test which adds -no-integrated-as will cause subsequent tests = to +# succeed, and not trigger further additions. +# +# The tests to select whether the integrated assembler is usable need to h= appen +# before testing any assembler features, or else the result of the tests w= ould +# be stale if the integrated assembler is not used. + +# Older clang's built-in assembler doesn't understand .skip with labels: +# https://bugs.llvm.org/show_bug.cgi?id=3D27369 +$(call as-option-add,CFLAGS,CC,".L0: .L1: .skip (.L1 - .L0)",,\ + -no-integrated-as) + +# Check whether clang asm()-s support .include. +$(call as-option-add,CFLAGS,CC,".include \"asm/indirect_thunk_asm.h\"",,\ + -no-integrated-as) + +# Check whether clang keeps .macro-s between asm()-s: +# https://bugs.llvm.org/show_bug.cgi?id=3D36110 +$(call as-option-add,CFLAGS,CC,\ + ".macro FOO;.endm"$$(close); asm volatile $$(open)".m= acro FOO;.endm",\ + -no-integrated-as) +endif + +$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) +$(call cc-option-add,CFLAGS,CC,-Wnested-externs) +$(call as-option-add,CFLAGS,CC,"vmcall",-DHAVE_AS_VMX) +$(call as-option-add,CFLAGS,CC,"crc32 %eax$$(comma)%eax",-DHAVE_AS_SSE4_2) +$(call as-option-add,CFLAGS,CC,"invept (%rax)$$(comma)%rax",-DHAVE_AS_EPT) +$(call as-option-add,CFLAGS,CC,"rdrand %eax",-DHAVE_AS_RDRAND) +$(call as-option-add,CFLAGS,CC,"rdfsbase %rax",-DHAVE_AS_FSGSBASE) +$(call as-option-add,CFLAGS,CC,"xsaveopt (%rax)",-DHAVE_AS_XSAVEOPT) +$(call as-option-add,CFLAGS,CC,"rdseed %eax",-DHAVE_AS_RDSEED) +$(call as-option-add,CFLAGS,CC,"clwb (%rax)",-DHAVE_AS_CLWB) +ifeq ($(call as-insn,$(CC) $(CFLAGS),".equ \"x\"$(comma)1",y),y) + export HAVE_AS_QUOTED_SYM :=3D y +endif +$(call as-option-add,CFLAGS,CC,"invpcid (%rax)$$(comma)%rax",-DHAVE_AS_INV= PCID) + +# GAS's idea of true is -1. Clang's idea is 1 +$(call as-option-add,CFLAGS,CC,\ + ".if ((1 > 0) < 0); .error \"\";.endif",,-DHAVE_AS_NEGATIVE_TRUE) + +# Check to see whether the assmbler supports the .nop directive. +$(call as-option-add,CFLAGS,CC,\ + ".L1: .L2: .nops (.L2 - .L1)$$(comma)9",-DHAVE_AS_NOPS_DIRECTIVE) + +CFLAGS +=3D -mno-red-zone -fpic -fno-asynchronous-unwind-tables + +# Xen doesn't use SSE interally. If the compiler supports it, also skip t= he +# SSE setup for variadic function calls. +CFLAGS +=3D -mno-sse $(call cc-option,$(CC),-mskip-rax-setup) + +# Compile with thunk-extern, indirect-branch-register if avaiable. +ifeq ($(CONFIG_INDIRECT_THUNK),y) +CFLAGS +=3D -mindirect-branch=3Dthunk-extern -mindirect-branch-register +CFLAGS +=3D -fno-jump-tables +endif + +# If supported by the compiler, reduce stack alignment to 8 bytes. But all= ow +# this to be overridden elsewhere. +$(call cc-option-add,CFLAGS-stack-boundary,CC,-mpreferred-stack-boundary= =3D3) +export CFLAGS-stack-boundary + +ifeq ($(CONFIG_UBSAN),y) +# Don't enable alignment sanitisation. x86 has efficient unaligned access= es, +# and various things (ACPI tables, hypercall pages, stubs, etc) are wont-f= ix. +# It also causes an as-yet-unidentified crash on native boot before the +# console starts. +$(call cc-option-add,CFLAGS_UBSAN,CC,-fno-sanitize=3Dalignment) +endif + +# Set up the assembler include path properly for older toolchains. +CFLAGS +=3D -Wa,-I$(BASEDIR)/include diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile index 9a433f01fbd4..8f8508dd842e 100644 --- a/xen/common/libelf/Makefile +++ b/xen/common/libelf/Makefile @@ -9,4 +9,4 @@ libelf.o: libelf-temp.o Makefile $(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$(s)) $= < $@ =20 libelf-temp.o: libelf-tools.o libelf-loader.o libelf-dominfo.o #libelf-rel= ocate.o - $(LD) $(LDFLAGS) -r -o $@ $^ + $(LD) $(XEN_LDFLAGS) -r -o $@ $^ diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile index 9ea5c696d52a..42986e118ebf 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -11,4 +11,4 @@ libfdt.o: libfdt-temp.o Makefile $(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$(s)) $= < $@ =20 libfdt-temp.o: $(LIBFDT_OBJS) - $(LD) $(LDFLAGS) -r -o $@ $^ + $(LD) $(XEN_LDFLAGS) -r -o $@ $^ --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579615258; cv=none; d=zohomail.com; s=zohoarc; b=WyVHMGscB3O5f2lj3tK3eR7IdIaSnMsdz1JzyAMSAy45hV+c99xREVn9RqFGCRivfd+lGJN+II7EQkhinRnc+Tv0C+cENdI/W5R8LEisWrCeWlyXw+4Co5pqhWE4tBfghvhMT0/au5pJDWRk6W+gaNuwcbM+OX57WSpmfH9/Dug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579615258; 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=0qDsnF/ROTmpsMYHslI5SJzhmUodPj4a8H65tOakJcM=; b=EzVKggJD7GIFHmZUYLQ5De8vJEyIZDkBp+/6vyDdMMDFl7SEf0UgZFRHh5fhq7ooDmqViahdlEt+IZDmL1Xg0IvrtpKYW9p9ioZg1gB/hBTvG3FFRkaokV8Fczvh+6SKphmrXKjnQ6Q/+wcTUWsymJwqKAhy0bAq5i2Nj2p9tEQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 15796152580741016.1276529855868; Tue, 21 Jan 2020 06:00:58 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1itu4G-000871-Ml; Tue, 21 Jan 2020 13:59:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1itu4F-00086w-4d for xen-devel@lists.xenproject.org; Tue, 21 Jan 2020 13:59:43 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 40d4f972-3c56-11ea-b833-bc764e2007e4; Tue, 21 Jan 2020 13:59:34 +0000 (UTC) X-Inumbo-ID: 40d4f972-3c56-11ea-b833-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579615174; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=q81O0NQnXh4Nf3/E92q2P+Njy9Qpi8zaniekHshzOHQ=; b=GW31KdtRxFXl6L05NfTyy2HuR79svSPv87yPJrd3X1B7WuHHHKL1MlBv pYtWV+Sxy6y8mu3eYWxFknmDoeZYmRu8y5PSZp+BXQgnuZ4kLVve4WD0X /lzSm4I41RwcZUBf1NvTq6rOgZPsUlVVpY7X6WK2JyJ9WLc2WFVKxk9Pg E=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: QhGb9cH6s4v0JACVyroKyoqsIdwRmS490XB/NZ8kCr5pn0vi5eBMNLzfOX+eHl7Et7QfZL/zk7 oVo+tD2vg/27dq34wDlId4oDSrEhjGJaU/qvYEY+nQIRkKKfZ7IyT4RojER1gS9asHmCVyV1aZ rkZsnYCHqdD6AO4lvQslB/d5+7dyum38qnJflO1VesHSAo97qE9l8EwnaBQtqS+H861ELrVA7T 1RH6dAphEr8H4U2lUUJqjdoXTdGuM5bfE5n87w+1faHGhcHqmwiLm+6SIeuAKJ2wpf3oqrj57O EjQ= X-SBRS: 2.7 X-MesageID: 11636294 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,346,1574139600"; d="scan'208";a="11636294" From: Anthony PERARD To: Date: Tue, 21 Jan 2020 13:59:14 +0000 Message-ID: <20200121135916.1140483-1-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2.1 13/12] Makefile: Fix install-tests X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Anthony PERARD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The top-level makefile make uses of internal implementation detail of the xen build system. Avoid that by creating a new target "install-tests" in xen/Makefile, and by fixing the top-level Makefile to not call xen/Rules.mk anymore. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Makefile | 6 ++---- xen/Makefile | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 512d6b73c898..9ad2602f63f0 100644 --- a/Makefile +++ b/Makefile @@ -155,13 +155,11 @@ install-docs: # We only have build-tests install-tests, not uninstall-tests etc. .PHONY: build-tests build-tests: build-xen - export BASEDIR=3D$(XEN_ROOT)/xen; \ - $(MAKE) -f $$BASEDIR/Rules.mk -C xen/test build + $(MAKE) -C xen tests =20 .PHONY: install-tests install-tests: install-xen - export BASEDIR=3D$(XEN_ROOT)/xen; \ - $(MAKE) -f $$BASEDIR/Rules.mk -C xen/test install + $(MAKE) -C xen $@ =20 # build xen and the tools and place them in the install # directory. 'make install' should then copy them to the normal system diff --git a/xen/Makefile b/xen/Makefile index c326fee5880e..72bc89924622 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -90,6 +90,9 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) .PHONY: _tests _tests: $(MAKE) -f $(BASEDIR)/Rules.mk -C test tests +.PHONY: install-tests +install-tests: + $(MAKE) -f $(BASEDIR)/Rules.mk -C test install =20 .PHONY: _uninstall _uninstall: D=3D$(DESTDIR) --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579615259; cv=none; d=zohomail.com; s=zohoarc; b=WPPvJJcuiN7XOCO0ZZj9zCpQZN6ZSjcx0YN/nXmZcD9ciz9CVhHqM1rfniVMjQW268gWHDA0R0V8T7QciGMVRIhqzkX9mggzqWrxVpbeuXt24uNnveJ+bi+p1iP06J0WVQYC3XV3O6YuFMAVchOIW9oyfq/FecvCsyPecRkCEQ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579615259; 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=AI5p5xPjExfURWGTogbteFGAHj81sYGozh/ZYG+eUZA=; b=doHVGNH6LHiXmUMnHkw8guoiNrR2LRaYtkvEIs2eb3/0U/viPYh737b5MM5Dgxqaatpo+ubHps8V5gpiv8kBINEJ9N7SguxQ7kEP6BXWk4lGWZPpECCbSaENsaC5ueMN7D1Vax6FlNAh0rshq+PFbOsoDW1nCS/p/rgmhlPtB/4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579615259202532.3749456869696; Tue, 21 Jan 2020 06:00:59 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1itu4e-0000Ll-BP; Tue, 21 Jan 2020 14:00:08 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1itu4d-0000Jo-NM for xen-devel@lists.xenproject.org; Tue, 21 Jan 2020 14:00:07 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 51da8afc-3c56-11ea-b833-bc764e2007e4; Tue, 21 Jan 2020 14:00:02 +0000 (UTC) X-Inumbo-ID: 51da8afc-3c56-11ea-b833-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579615202; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wtpMBqUjXBTNLQWEki1dXGxzADeRYoZdTCRuseAfv5M=; b=ZXqiqpu5SA3EVVdwZ0xndneVSReEYv6DUlPGOUAuQd7MkTmZuIIvoNro SEwqweFQHKLKMx7O2hejq65tJH4mX5T+8MyWKZzQshPIXI9eyqZUBof9N Dr/52esA0BmOBzgjXEdduPRK0GgVvZOb7hJIJ/PmQLi6Mu9VSace59fgD c=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: aVtWtStx+qP04iNIVTxFBVcA8lCw/u8yFObJMIqJCzsPzjDgy6udw3hn8IR9trw9magpuOTBhD umTU0DxigKFvnfxQP6qwVnagEVWDAzxDIxSwdQiuUA0KY/4WKg4MsZhWD0cm4FpuRjVTUPzAWf UmMWR+JOX3Zcc++U5nkgRE3xkisIzChdjfWDhjZB0ZrSP4/WrEitu8WnANRbppKZ5Q9/f5GffU 4e4b6QF6D60ssdzvV9Kpoo40LYU6221aSMyW7xFJ3AI2RuoMOAdjuVyqZU9Qcos50Bftywlvkv ki0= X-SBRS: 2.7 X-MesageID: 11799417 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,346,1574139600"; d="scan'208";a="11799417" From: Anthony PERARD To: Date: Tue, 21 Jan 2020 13:59:15 +0000 Message-ID: <20200121135916.1140483-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2.1 14/12] squash! xen/build: introduce ccflags-y and CFLAGS_$@ X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Anthony PERARD , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) -DXEN_BUILD_EFI and -DBUILD_ID_EFI seems to only be used in xen.lds.S which is build using the AFLAGS, so add those flags only to asflags-y. Signed-off-by: Anthony PERARD --- That fix build of xen.efi. Should add asflags-y into the patch title. --- xen/Rules.mk | 4 +++- xen/arch/x86/Makefile | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 4051d60addb5..add7cad93e4e 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -39,6 +39,7 @@ ALL_OBJS-$(CONFIG_CRYPTO) +=3D $(BASEDIR)/crypto/built_= in.o =20 # Initialise some variables ccflags-y :=3D +asflags-y :=3D # Allow arch specific cflags, to be calculated for each objects. arch_ccflags =3D =20 @@ -101,7 +102,8 @@ c_flags =3D -MMD -MF $(@D)/.$(@F).d \ $(ccflags-y) $(CFLAGS_$(target-stem).o) =20 a_flags =3D -MMD -MF $(@D)/.$(@F).d \ - $(XEN_AFLAGS) + $(XEN_AFLAGS) \ + $(asflags-y) =20 built_in.o: $(obj-y) $(extra-y) ifeq ($(obj-y),) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 191e2173315a..1e013ee31131 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -174,14 +174,14 @@ EFI_LDFLAGS +=3D --major-subsystem-version=3D2 --mino= r-subsystem-version=3D0 export XEN_BUILD_EFI :=3D $(shell $(CC) $(filter-out $(CFLAGS-y) .%.d,$(CF= LAGS)) -c efi/check.c -o efi/check.o 2>/dev/null && echo y) # Check if the linker supports PE. XEN_BUILD_PE :=3D $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsyste= m=3D10 -o efi/check.efi efi/check.o 2>/dev/null && echo y)) -ccflags-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI +asflags-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI =20 $(TARGET).efi: VIRT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n '= s, A VIRT_START$$,,p') $(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's= , A ALT_START$$,,p') =20 ifneq ($(build_id_linker),) ifeq ($(call ld-ver-build-id,$(LD) $(filter -m%,$(EFI_LDFLAGS))),y) -ccflags-y +=3D -DBUILD_ID_EFI +asflags-y +=3D -DBUILD_ID_EFI EFI_LDFLAGS +=3D $(build_id_linker) note_file :=3D efi/buildid.o # NB: this must be the last input in the linker call, because inputs follo= wing --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 11:55:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1579615256; cv=none; d=zohomail.com; s=zohoarc; b=jDNmpGsROqwqsUYGXfmPdJS0f7XUQo2WIEgvKgUb7d4vMom9u9SjhUr0/8M019qcyeqprf0pa4J6D2Ztaz4BGe/QlLEwsjKn2P5shkzkbQVnrlSUf2cnUuW0oZRcCffx/nDkDkBu5QkJq83kFfsX4eyE/IoYY7aFiBNkeKv2OrA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579615256; 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=Kk0AdrRJMZNykm/vrVIj6+CjJcyPZ2vwzqXlNWhjvj4=; b=ft9nm2jo6KN52Ej7L1JaQVJDFkzgK5EAnTtKPClpuJghtHDUnrg5Z3PoioYoSfb/ala4yIhoe2H11zxZ0IXuXfdTEOI2GQIs+zdVY7SpQR+Usi8/Ko/C8YZswnoyvJdLDAsB7K4knGBoMUG3ukMtnEeN21OcCt2bv4mlgm6W1r4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1579615256482179.20332780993738; Tue, 21 Jan 2020 06:00:56 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1itu4a-0008PZ-0f; Tue, 21 Jan 2020 14:00:04 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1itu4Y-0008KW-M9 for xen-devel@lists.xenproject.org; Tue, 21 Jan 2020 14:00:02 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4c48d60c-3c56-11ea-b833-bc764e2007e4; Tue, 21 Jan 2020 13:59:54 +0000 (UTC) X-Inumbo-ID: 4c48d60c-3c56-11ea-b833-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579615193; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AWPHd+gFksQ+RfViBKMLTOw1lLSHpXqkV5OJYt/ukw8=; b=AMrmuOQ+6iWFsPQhS7zjFKcU1i54HlQ6AHqjQZFhvWsc5dsD23ohwbRA JafJRJpv7HKg8Ow9eiAtwU922XESBbajUdvDEwJiEPPgzY2prQsUtP44Y tzdErCFi0hxmH8eSDkOBwUYL3pFYVikj2sSKznmYy4rjMup3D4kX+1AIT g=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: lDgqW8EO3HL3Hjktz3xwyd1Ybo+f7BEP5nKGLkVTp3m7rfR6QPJxVSwNWpbLNjlw00cNvT+b+a uytkCW4yQcQEULPXLuEy+xRx4yGbBDObyHJkmm8S/QIgFFxrxdjgMG5LPO5K2EfqEMTJHlTt4h KggGPmS0f5/fOoy7RJxlJgU0Mo9YkXzc32YvSPf0aIPT5PDbbJ4ZNoQAwc+Q1ctpWSWv33i28Z 0hkC+qogf7XjyAUTzVzTWG5KjPKdCxi6A2zPhM8f809uffpYLU6JoKv4iZ1a6A4JU4HezB0VU/ E3U= X-SBRS: 2.7 X-MesageID: 11799415 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,346,1574139600"; d="scan'208";a="11799415" From: Anthony PERARD To: Date: Tue, 21 Jan 2020 13:59:16 +0000 Message-ID: <20200121135916.1140483-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117105358.607910-1-anthony.perard@citrix.com> References: <20200117105358.607910-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2.1 15/12] squash! xen/build: have the root Makefile generates the CFLAGS X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Andrew Cooper , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The XEN_BUILD_EFI tests in arch/x86/Makefile was filtering out CFLAGS-y, but according to dd40177c1bc8 ("x86-64/EFI: add CFLAGS to check compile"), it was done to filter out -MF. XEN_CFLAGS doesn't have those flags anymore, so no filtering is needed. Signed-off-by: Anthony PERARD --- 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 1e013ee31131..3f7702f42a9d 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -171,7 +171,7 @@ EFI_LDFLAGS +=3D --major-os-version=3D2 --minor-os-vers= ion=3D0 EFI_LDFLAGS +=3D --major-subsystem-version=3D2 --minor-subsystem-version= =3D0 =20 # Check if the compiler supports the MS ABI. -export XEN_BUILD_EFI :=3D $(shell $(CC) $(filter-out $(CFLAGS-y) .%.d,$(CF= LAGS)) -c efi/check.c -o efi/check.o 2>/dev/null && echo y) +export XEN_BUILD_EFI :=3D $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o ef= i/check.o 2>/dev/null && echo y) # Check if the linker supports PE. XEN_BUILD_PE :=3D $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsyste= m=3D10 -o efi/check.efi efi/check.o 2>/dev/null && echo y)) asflags-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel