From nobody Mon Apr 29 05:18:05 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=1582716909; cv=none; d=zohomail.com; s=zohoarc; b=jE/oPcfZDFPCpAbCSqMPRkrP5d2woN19lWNeseG9ji6y2oLP6g6xRTxMt8Br2i6cmPrvOu6Jbsi3MsVV1CTYChjCmdWeDDr1K7DERnRJjjXHFQ5ixyAJjlzvR4nCv22Yvgxq3pCdtHmUSmpvKdur1+KJDzH4idRv3sq+F2uWAS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582716909; 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=9sbJPhf8lzA2V1PviTf3ix3NpBdI3dzZn4XYnwUMzPY=; b=Lwj7GzsLMkFB9ys78WTBQrp9gsUuIO2MTHPCnywJtiI+PBcUagkEDXaLd8dsOAIqnWNJvAsQw3eSaFsdRBfOCzBk6xG3cTThINWlwg1Hg2yHFRel79JE6IKXeKrezDtvYw3BuPxhLijaG/tTS5901dI8Ff/F0vCxMP3P1knw5mY= 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 1582716909683968.1508098159461; Wed, 26 Feb 2020 03:35:09 -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 1j6uxL-0001Ee-40; Wed, 26 Feb 2020 11:34: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 1j6uxJ-0001Dv-Vx for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:34:22 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e2e9856a-588b-11ea-93fd-12813bfff9fa; Wed, 26 Feb 2020 11:34:02 +0000 (UTC) X-Inumbo-ID: e2e9856a-588b-11ea-93fd-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582716843; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=C6RLXrG/xUrSOlFLkn4n87JES4eaBiUlHD4DzmcAIuI=; b=fxgotDJQFDr7WWMdPv6VMs/3WLoRKOTbixRI7BGA5cEqE2WWYvQR0fKj eJqycPuBLZq3t8HcqF2+xx3JcUpzzkMthH9H2+O5pwnB1Pnw6OwsOJ4Fx cyvNmG9mPtMmTCyExqxfFi2nlf1NTYfU49eet7X0O8zjKsbn5R3AGYEl+ Y=; Authentication-Results: esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.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=esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: AsJBmG3ZsZn8CDQEsGuE4AEq0Jvo4WPtmlpN3h+jvyjwICTnngBbiSWNL5tjKDrE8EksthiXcM b2bWt5bNI/rflUhZJiQpWKtfPjmnksW3QyAjLIwlLAlam/9yBTrZiCt2ZkSNfAEuBNlv8l1VrT uiK3Uw4ta88lY4VHx7d5bic7K3yxx5Z0Xs5GZBAgyTs2VUrlqHl8mQ3ttX2SZ7tb2IT9gND8ct qAQYcD+P/kNwX+AFvfxmHzez82+xEViIOyhEqwhasRNv69YuZ0eWqax6PKPVHi/P4R78E9MFkE U8w= X-SBRS: 2.7 X-MesageID: 13211003 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,487,1574139600"; d="scan'208";a="13211003" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:33 +0000 Message-ID: <20200226113355.2532224-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 01/23] 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 Mon Apr 29 05:18:05 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=1582716897; cv=none; d=zohomail.com; s=zohoarc; b=NkO2CE1aO5otkUdLIHPe2OmPRGNx60K73wKaeMiYinkwX1p2BmtEhdD4FK/5H6uPMsrAnmOz126jdiHV9QsyPK5mlFvGjpwJCvveTmd0mlGOUt+T28QxFVm6Eaw7ydhTmcRnjgxugvGEQcbLOip8S1Jnz5jwBfrhnsIYrq8FnFU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582716897; 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=6sYyLiEicXSE8Z8fUhWeKhHBNyx4fvnnS44hBkHbwDk=; b=PMlD6Rv8GdhepBTRWlrBeyeg8qJK8Mn7pvQY2Wd7uCTZP6iN7pOOC2ntf9JmonkLzm2jfQLQgXeVsdnJc+mxfVIcHbRTASkjL3Zqx4Hx/oTvE2QN3/oKEG4vU4uvRiv9kuSS2NWJ7QHlY5/pTz6FI15fL8+Sa2OtPhyNU1ODUQc= 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 1582716897079668.7456095152609; Wed, 26 Feb 2020 03:34: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 1j6uxA-000189-FK; Wed, 26 Feb 2020 11:34:12 +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 1j6ux9-00017s-Va for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:34:12 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e2ddc95b-588b-11ea-93fd-12813bfff9fa; Wed, 26 Feb 2020 11:34:01 +0000 (UTC) X-Inumbo-ID: e2ddc95b-588b-11ea-93fd-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582716842; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fmgWIdjipiwuK2QR7dZ5Eh7l3cqFUNollWIfYkP9fcM=; b=UbP/EKnO7jfPrpCWOz/xMdN8YY7Q8PushuNIrHjBnhXYO/2Eh1CSS6na PPXCNh4N7A2z0wZ/BxyNLkDsRahhyIsEJ3OwzyrM4mfUXnV4Mcv3XckeP dHAHJTGtfZbbYlXvPVBgbnTrOJZWvGSgbrzZwRmTfVb0hGjIC//6boTu2 4=; Authentication-Results: esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.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=esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: yi5GqRzYnddZot95xlF5smO8eI3J92QrdS8UCK8WmMKHkT/xm2tl9NjLJvOyu69yxZQTiYTUoN gFUVFO/xDF4CRIVmAP6mhlxEyCO3ypgJCvjddhY95q7rTkemHAbIWUtV8zcdK0oCVx35dR6N0p l9syOqAID8ZiRxjWq5qmgIEDcWnRDhNqY+Rig5qPeyP7Oi5iewBkaHkbRpOdXqJuUoyjo1PvlZ uaka6Rp7bFt0rsgReicq6yuuzBu8ecduzHjy2Yy9I4k/kbCjV4Ocuf2DNK0b4BN5YPeTmDljiW KoY= X-SBRS: 2.7 X-MesageID: 13211002 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,487,1574139600"; d="scan'208";a="13211002" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:34 +0000 Message-ID: <20200226113355.2532224-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 02/23] 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 , 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) 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 --- Notes: v2.1: - new patch, fix `make dist-tests` in osstest. 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 Mon Apr 29 05:18:05 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=1582716902; cv=none; d=zohomail.com; s=zohoarc; b=VrSLW60bE4ycndVc3dWhnxyI3HX2Ei3OqqA79VCdyO10PCXNtttZCSFttGwmg0UKGJmVVV/rcZD/zhXKN3HFNQgZMkm/gEX/G2lPBjc9h9xkGblu4EJQNGQgw/L2/48iF5f+Y4zMl7Y3HI/Q1KBhcQkIh53y0bHGCADhBhKfboE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582716902; 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=s7VGdVRZYZvGRDUGWP0ctmfld+X5iOToMXD/oZQnO1w=; b=W3/wyAGiGzvEw3xvUqgh4IgiVcBW2lW40cUiqvPIQJsjtmijynOxnXN4zv8TyeJjU1t2pXmAq52cqYvVTAaLfEx5EMQK6iwcj5AZIkhAnekcjluIgzAiSsKJrfI8Z0r9qC82zYUvAXn9YW0DljGtUquLZ0plFuXAq4V3K7CnMis= 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 1582716902957228.49351543079206; Wed, 26 Feb 2020 03:35:02 -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 1j6uxQ-0001IZ-FA; Wed, 26 Feb 2020 11:34: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 1j6uxO-0001HY-W1 for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:34:27 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e39d476d-588b-11ea-93fd-12813bfff9fa; Wed, 26 Feb 2020 11:34:03 +0000 (UTC) X-Inumbo-ID: e39d476d-588b-11ea-93fd-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582716844; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zE3Bm6eVYCfqIOYWXu0WJVEEm1KRkMR9dJalinzfSvA=; b=Yqy6PcVw5sqfbzoqSNrnf5ZRN/5+DH/Ooo/ikrsNCiAcZl32NCVkg18/ hbl/Nb3Le5363ksZFo8YsMMnIyC/cGIYHG3f2tD632BZmmkXyKn2hIFe6 nTDe3Ho/COHfhcnpdWf/Kbk/9u1tWj6nVn4uLATsQzQuyWhdGJkUzJ6+p s=; Authentication-Results: esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.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=esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: Bw5HqC+mPz7j6aCFOOTpGEeq/fRfk/GkAU2KhahDCOXn+5iFvaICeqjH0JvRffjwx5rWxY1UJ4 tWoEw/pluDFW7jjQnrLxCpjnrgGCp7hAiX9lBLmcPQFdCJ0jPlwC0jHO3/GyxFHGwDva42CZhf 6jLouLG3fFanY1LDdCdemvdtWSlsZ4ncMTW11rlFlsw1MhTBoRYjHWwEeBRsDNmchIyBp8Wxs5 jiB9nCt/+OfSC0AStHXQgC6H2NwXOZ/fuv6ZXtEjBPS5YnyBVapvAxHQ4KGIxviByDdHqgnXYg Rfg= X-SBRS: 2.7 X-MesageID: 13211004 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,487,1574139600"; d="scan'208";a="13211004" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:35 +0000 Message-ID: <20200226113355.2532224-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 03/23] xen/build: Remove confusing comment on the %.s:%.S rule 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) That comment was introduce by 3943db776371 ("[XEN] Can be built -std=3Dgnu99 (except for .S files).") to explain why CFLAGS was removed from the command line. The comment is already written where the -std=3Dgnu flags gets remove from AFLAGS, no need to repeat it. Signed-off-by: Anthony PERARD Acked-by: Wei Liu --- Notes: v3: - new patch xen/Rules.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index d22a16d28282..c21203351a9f 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -230,7 +230,6 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.= init.o: %.o Makefile %.s: %.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -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 $@ =20 --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582716912; cv=none; d=zohomail.com; s=zohoarc; b=B2Nt7PpfxhjtMAt/55cGMspJCOquoE5KqKkMJ04dCprU8aoYZMaeWHvZ/aKZAAgk75DU9Fxo85RGWpE3ph+JBZjYxTHWvW058ehOqw42BgkJIWrdUZtYC2sGZjhH875AylSQZRkcKBxO2xko/PiLXhMo9ZChK0CSbfOtcCiQB5k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582716912; 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=qmJ+oBWruTiF6yL731tAHpgS3E3SVp8k61emYeglesQ=; b=h4DXrqZbBYDXaZlRhDUXUVE20d4om6PHfh6WUp1u9GKql8j6qyvK8hcY9IBENbKjZBWJ7Psjq87tRFZ5FoWZmz0ZfjPLo3pMhYOqVskcDTRgsjq5TNS/ntOprQcE/Yj+YqmdCBCE0QuVZeJyybhQjWbN2tt2u/Ws8olRyJcjLHo= 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 1582716912732279.6416351420487; Wed, 26 Feb 2020 03:35:12 -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 1j6uxU-0001LW-Qe; Wed, 26 Feb 2020 11:34:32 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6uxU-0001L3-08 for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:34:32 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e4282dfa-588b-11ea-93fd-12813bfff9fa; Wed, 26 Feb 2020 11:34:04 +0000 (UTC) X-Inumbo-ID: e4282dfa-588b-11ea-93fd-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582716845; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=G7TB6wcfMvzkfAjy1ejkIUlbKPndov+7d0e9ADpLygw=; b=JxjT0ty9I/8iRWGqDYsplp7UboniMO+jrXuqcqs/Gs3nClBrknVG4/md 419BsHwJisQWpY9iqAWfyF8YBarNa59dpjYNSBe7DFOvkiTO1+2niHdsj cApyhlVU8jkzql0l3iAUssRcYkAVaDU2LCCDlaGZg/HSHmYtCHYL28tg2 0=; 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: sQCJ+08jvqwUF96dnpGR8FxM9pamWJyC4jZ47EKb1imeNKa3ppYi4N7/dL5WB6dFwgKiKE4fEE pftJ32FPPRcfFG46dMMRs9oaYqJy7DWOCzMo5r7e+p6tzkdZiC9Xf5/nUAuvLNWj5j0ztinaQm iO9AJ6IGn83j9KW49elEwVjTlBwhK0LqAYpnepS8UNbNGMnXjYQip6ryz7mT7h4aBKLEsmhXyW cZ7kQ7ibnyo/HtmazXBMNUz1z+9/Ikar8xC+DGsPysV7xrA0lQGgZwEwwj7Vol2jvBXtv5j48Z Wgw= X-SBRS: 2.7 X-MesageID: 13038216 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,487,1574139600"; d="scan'208";a="13038216" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:36 +0000 Message-ID: <20200226113355.2532224-5-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 04/23] xen/build: remove use of AFLAGS-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: 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) And simply add directly to AFLAGS. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v3: - new patch xen/Rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index c21203351a9f..154269bfd96c 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -71,7 +71,7 @@ ifneq ($(CONFIG_CC_IS_CLANG),y) CFLAGS +=3D -Wa,--strip-local-absolute endif =20 -AFLAGS-y +=3D -D__ASSEMBLY__ +AFLAGS +=3D -D__ASSEMBLY__ =20 ALL_OBJS :=3D $(ALL_OBJS-y) =20 @@ -85,7 +85,7 @@ 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)) +AFLAGS +=3D $(filter-out -std=3Dgnu% -flto,$(CFLAGS)) =20 # LDFLAGS are only passed directly to $(LD) LDFLAGS +=3D $(LDFLAGS_DIRECT) --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582716886; cv=none; d=zohomail.com; s=zohoarc; b=R+glX9I+QNJt8olyW55DpFRcfMi9DGbOiWpX3WWvGOxRl3br2LkPcSwJXKUzc6JkhBfv+LsW69ibo9xJC4fU+8afxwmmSdJu9+X5I5s0pniPQYmrkcP0l44HcTpgpOk6eKZNQ23Ov0x5YfxJ6qkSsihzt4nATAdyL0qPpKZ/WaI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582716886; 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=4/CUQnVTbFJ+fM70PrYswArzDcXPDUMsNShPQC+B0DA=; b=l57PvvdKDBAGmWcHrSa0Tx6yAPYHiSvrKZFDu1L+Q7R2aLcd2gOw2bBdz80g/XOK8cTUNzJPhInSzI7591V+k5mS0bNrS4XzGJRS/mtYRjL3y+HJo4JtPBKBzRWda93UVRDwL4wBh0tsAbNnxtYjD0E+VibYKdlq3ezeGYs6U9g= 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 1582716886185388.8915138179632; Wed, 26 Feb 2020 03:34:46 -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 1j6ux3-00013q-FA; Wed, 26 Feb 2020 11:34:05 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6ux2-00013T-Ay for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:34:04 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e12890ae-588b-11ea-aba8-bc764e2007e4; Wed, 26 Feb 2020 11:33:59 +0000 (UTC) X-Inumbo-ID: e12890ae-588b-11ea-aba8-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582716839; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hEyVUEJZoqNpzOyyuY+v5WWTIO3kbmM7ep4YALQEAYo=; b=CD81CQgDCBWUsG/XbhtsnZtfU5oonzJ/nTRlKWu/UGhEcUkg9rEy5zzW SOpDQwMJ3Je+GNcCgMEwjLQLqzx/bryQshPRh3fnxymtWTmkV3is81s/L mngMDGRHtFMNhQW6jNZ+wQc9BPx6ev55lhn1xa0l58wukndv2dd6VgCwU 0=; Authentication-Results: esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: ZLavmTemiXCy1n0UjybYOm+Y7GU7lwUEWLORiRAlyUz3Dr+holLpIDC+17IxqpD7NzrJ6JSucm 4F0UmgVN1iPxZ0TYUCyNc+fYMrJwB06aa8EgIJkssV5Dxvnebb8WijTX5D687i0Vt+Vmy9rwMF A/e/JgSZ0jMbQhtxWdq2ZMNsMiSeyy9QCPjBvZG9RCv5FLICQZ9248rvc64biN2Nkw6jJ21b1m jEFlepC6D7ob+4bbZB2zC/o6OBQSHn7u6ceDqfR8/dih3LFcHcsqjN9aZWDvVZ0W6Iwh6TIeAi YMU= X-SBRS: 2.7 X-MesageID: 13012715 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,487,1574139600"; d="scan'208";a="13012715" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:37 +0000 Message-ID: <20200226113355.2532224-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 05/23] xen/build: Allow to test clang .include without asm symlink 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 , Jan Beulich , =?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 clang test for "asm()-s support .include." needs to be modified because the symbolic link asm -> asm-x86 may not exist when the test is runned. Since it's an x86 test, we don't need the link. This will be an issue with the following patch "xen/build: have the root Makefile generates the CFLAGS". Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Reviewed-by: Roger Pau Monn=C3=A9 --- Notes: v3: - new patch (needed for "xen/build: have the root Makefile generates the CFLAGS") xen/arch/x86/Rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index e69b8e697cc0..4b7ab784670c 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -26,7 +26,7 @@ $(call as-option-add,CFLAGS,CC,".L0: .L1: .skip (.L1 - .L= 0)",,\ -no-integrated-as) =20 # Check whether clang asm()-s support .include. -$(call as-option-add,CFLAGS,CC,".include \"asm/indirect_thunk_asm.h\"",,\ +$(call as-option-add,CFLAGS,CC,".include \"asm-x86/indirect_thunk_asm.h\""= ,,\ -no-integrated-as) =20 # Check whether clang keeps .macro-s between asm()-s: --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582716918; cv=none; d=zohomail.com; s=zohoarc; b=NJ1DsuyzZPOwZvxWNxIn5PsZm6hHCA8BjNlogRzXtX31WLafu+/V/SNdthGJg5Wc3Krpeia5n50a8Uh9lT2WUoyGkfhSfwAPJEZ4b/NFGfX0gdoapESKMKuncvZGXjkNfuTsJkiZopRRLNrIamqasVwpaB7XU29wSS9g/KVnUu0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582716918; 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=UnuUexnGqWUOo6NT26DamqNE75vwOV1h0gNNtO47wjM=; b=TD2h646NvtLW5W32Srow2VzItv1FsBgO5MCJiywq9vQQw/G3gSGVSuEDgiStW9b9FAEyhmBbYpThXm3iPs7SdaaQ03tuQuslHLO81DB5uZsiasPL8t3ozIzPwxIlp/4cAmactjjz4R52CE/oPx6rem2ILO2aAQ5P2FIXWhdQXR0= 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 1582716918124380.8597851472972; Wed, 26 Feb 2020 03:35:18 -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 1j6uxa-0001Qp-92; Wed, 26 Feb 2020 11:34: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 1j6uxZ-0001Pg-0I for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:34:37 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e4d5f638-588b-11ea-93fd-12813bfff9fa; Wed, 26 Feb 2020 11:34:05 +0000 (UTC) X-Inumbo-ID: e4d5f638-588b-11ea-93fd-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582716845; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KWtS4gjAy/REs2CdIOW7hoB+6OIzaJdNXKHYDGbqYWE=; b=YnFzxnqKdeRAgsIN9tSqlE6ZwdBwfG2d4J4sJlFbdEWp5SiCftxpLaNY fN2lVu0z6sCJwzBISrQFyUWdFxuWEFvR79by/392iuP3qKVZN9dh6I7DU vcWW1Bzi/EM/bsrvnY2xQZoQt314ee1W3fp+QoOiNXMRDzwdkIB+s6bqS U=; 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: ksSdPxKXO4HqSl6eSlqD+/HKjXtOnP2uRwpViptKgg5dg5+EKXed881rNmA3f2vt9XQ1F24Gdn MDcmzGk68yKjonCkcjMGRc5NzkKhejZ9GEQu4IVUFv89tsZ3eH/3n/Nma6eDM1lLx90yprt7jw VmBPOxgKVRWyotGr/A++BhdZZXqx/a/NbhpI4VD8YrfDfF5AIr0VCeOlCYHbNzpOhEmO7jlHMN gmkIdQtmFmQVd9zfi920L57Z9BmySkGVegkapI775zCUQDRloYwrhTYGUpGIFyuzfriWYd9kYS Yfk= X-SBRS: 2.7 X-MesageID: 13038218 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,487,1574139600"; d="scan'208";a="13038218" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:38 +0000 Message-ID: <20200226113355.2532224-7-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 06/23] xen/build: Fix section-renaming of libfdt and libelf 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) In common/libelf/Makefile, when SECTIONS gets defined SPECIAL_DATA_SECTIONS doesn't exist, so only "text data" sections are been renamed. This was different before 48115d14743e ("Move more kernel decompression bits to .init.* sections"). Move SPECIAL_DATA_SECTIONS in Rules.mk before including "Makefile" to fix this. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Rules.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 154269bfd96c..c7a067d25409 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -92,6 +92,12 @@ LDFLAGS +=3D $(LDFLAGS_DIRECT) =20 LDFLAGS +=3D $(LDFLAGS-y) =20 +SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16, \ + $(foreach w,1 2 4, \ + rodata.str$(w).$(a= )) \ + rodata.cst$(a)) \ + $(foreach r,rel rel.ro,data.$(r).local) + include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk =20 DEPS =3D .*.d @@ -206,12 +212,6 @@ endif %.o: %.S Makefile $(CC) $(AFLAGS) -c $< -o $@ =20 -SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16, \ - $(foreach w,1 2 4, \ - rodata.str$(w).$(a)) \ - rodata.cst$(a)) \ - $(foreach r,rel rel.ro,data.$(r).local) - $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.init.o: %.o Makefile $(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | while read idx name s= z rest; do \ case "$$name" in \ --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582716891; cv=none; d=zohomail.com; s=zohoarc; b=jhNcscL/vEST5IHDlPblVBWyPLRrvQJAocwOBdtBgjJHO+jeo+aTVOO1Na92FmnHQfZeN8d1DwD0oBEOismppCKIi7qR0M8QjhlmFwmwMDlA0CvytC7bxekyeWWjkkEoKO90sXq/sEYS/cHE+3ADNOZjD3pqKL5cc/bm6XOAcoI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582716891; 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=KVwDvFKMMts/dhUmmQn9DtNB2B4Gq/nQkD39RAr4u0g=; b=PG5nXL57Xqy8MyGzPjL9qvd3RuNp3s2Vhkx4ZGRf2m2o5BIdpJRTwzxlYIbtfh4o6RJyli+/BiidRccW8/7TXRbB5ENRb5IlI8JUYK6TbFKT5666TvmPRj2hahvR1JzqHnzmWcYVdGR+3TwCrNqjiHt39lIGOPO1kjMocMWODq4= 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 158271689137463.0355497959456; Wed, 26 Feb 2020 03:34: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 1j6ux9-00016l-0X; Wed, 26 Feb 2020 11:34:11 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6ux7-000168-Bi for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:34:09 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e284254e-588b-11ea-a490-bc764e2007e4; Wed, 26 Feb 2020 11:34:01 +0000 (UTC) X-Inumbo-ID: e284254e-588b-11ea-a490-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582716841; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=A5/DXKGt1BifeDkPUDmCIpI78VmE+L/lNqApNdo5cfs=; b=Dl2+GpOGrRDE2zpDbxinVUUkngQr1IsQbhiHnNfi2VDakJxkSCbXY2XP NLbBA3m7xUYi+D5hqjmA+C/zlOmQuPpv83jnNkTNl0u8knzbJ+/lSWTwv 6StS+zF4dhV3DAbIyJzU0eZO9iiFehvDW5dL/pSVm6/gaE0viNmdpXYfw Q=; 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: vUonefS2jl0JmsP4V3+a0PgLC9RTg8KEtk4mpIRXltkfrs860LZFRqW0g9VLyqGUEN8JX7MCiO KBn5wbjMFxQ+h47BnB36XrOmpPECXS+jMg7OGPoBFC2+z5fY6o9ZUE3IVPYsjs8YnC5SC8BB0g 772c6nnyapJx3VZgWHzJbCVFF/03z/EstuyFIZtuMkG03PXK48TNTUn5EuNHbhQSAuMP8EL115 CGeDMF6Fd1j+b9Yry8UJBtzO5zH5OgW8BzMPBdYLPfiOELecCGvQExmghNG1ogbYu4IBlOAe3S 3O8= X-SBRS: 2.7 X-MesageID: 13461761 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,487,1574139600"; d="scan'208";a="13461761" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:39 +0000 Message-ID: <20200226113355.2532224-8-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 07/23] 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 Acked-by: Jan Beulich Acked-by: Julien Grall Reviewed-by: Kevin Tian Reviewed-by: Roger Pau Monn=C3=A9 --- Notes: v3: - no more tabs - reshuffle variable, and remove __subdir-y xen/Rules.mk | 19 ++++++++----------- 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 | 10 +++++----- 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, 60 insertions(+), 63 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index c7a067d25409..cc9c71bb1327 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -111,17 +111,14 @@ 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 $(subdir-y) $(filter %/, $(obj-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 bce5fdb3170f..ed709e2373ac 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 2abb8250b0f2..e8cde653708f 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -66,9 +66,9 @@ 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-y +=3D sched -subdir-$(CONFIG_UBSAN) +=3D ubsan +obj-$(CONFIG_COVERAGE) +=3D coverage/ +obj-y +=3D sched/ +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 Mon Apr 29 05:18:05 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=1582716899; cv=none; d=zohomail.com; s=zohoarc; b=XJuG4FivwC298CzT6ulKT1MaEUe44IUughVItDkG4YWXw0M/HtTUKPJdHZ36PcznIY525bAidxz8rhc3TuPcvgZCEjvoYw9qJvfgT41LgH/SAX+iPztqQ1Q36+MsjIDPluFnJPmPERsGbXA9vrLwkgJOgaC8YqEuZHUFFIJRdAc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582716899; 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=rOOaUHFSExTX9YrbCzWNmKGLlbdhGhbEPr6EWBDi+7Q=; b=iGAD1cdO+LLJ6XV8t4WISyTN00OXkQhjv4jSeA3d+dMp/BQSYWhFooeXo+Nt+0OLTvFrBVR3feiqedspZxM2s0RFkV6n0RmW7vPtUY25q+TKCFKuSBDNCcB9VkDyPMQFSKRzR8VvfiHYxHKUIqib9odOZUxJQljCB0BmMA3ygfs= 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 1582716899182733.1920994973187; Wed, 26 Feb 2020 03:34: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 1j6ux1-00012y-6S; Wed, 26 Feb 2020 11:34:03 +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 1j6ux0-00012p-0h for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:34:02 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e1290dc3-588b-11ea-93fd-12813bfff9fa; Wed, 26 Feb 2020 11:34:00 +0000 (UTC) X-Inumbo-ID: e1290dc3-588b-11ea-93fd-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582716839; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a9MG5U8ONIYkYE2MY1OAvdMQ7fu0c28GAyT3/UXdFsc=; b=JxCQeC0Dh6B72LBKgUwDPwIjYRdVnKKv5MGGf6qmESXzavh3YcCDxEor SZHV9zeOSlXykvMlTfoIV+OMoOlKZTYxH0C325n5tdmz/uJF+Tqiz771B Qs3nxVZ7DBYIM3dURd3iL4CLDm4TgJ/7diId2/asuqImOIsdpFTgDFtCH 4=; 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: 4oclCoZq/c3dMpWeduTwqw45vRhj3QWtXOwCvc7FvvGyf3Hn8YhRweCKG6ddLjuOyqB3ZtWrHe ZT/y/18K5GaqFYCg5iI17fPtVbPdgO68byeK3SiEbqWsuMvNXqkwSDmE/nImCbX/9bmgcnB3EN otXglvo3I0p+n3pexLaBFEpaM1jPF1h//Wfq/N19vBDV9idntYKjsCVoFL4ckb8Gp7wVPm+i4e 21KsQa5weKYujSs/rGiVcNGlnpSVlnr9W60jCRx1xzqbG+Wa4Di6v9K567mOrclWS81cymcSeB /JM= X-SBRS: 2.7 X-MesageID: 13461760 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,487,1574139600"; d="scan'208";a="13461760" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:40 +0000 Message-ID: <20200226113355.2532224-9-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 08/23] 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 72bc89924622..65bd913cd133 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -120,14 +120,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 cc9c71bb1327..e3b19319b1f5 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -189,7 +189,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 Mon Apr 29 05:18:05 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=1582716900; cv=none; d=zohomail.com; s=zohoarc; b=PWQfAFkw78/IMHGdtvqWlcrTO+WqhLQbzVx4MRyKLFBSzKj1IS1EPFqAoX9jNb5tvZnwWSy+CJW1gu8fExX7K7iiHRVKOy06BQEvhGMG5zeS4TPm9PPbn4sGjyJ88U/Z7fTe+ipodoMiIOrmGMG8U8bCHEfgQynPJqy/QbWC2UY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582716900; 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=7kamVaWS+6wBYZd/05sz2bp/oheRxSIhRsR74QR0cKc=; b=ifCaNYCE38hz+bYUhkZWaHdrbzOB9Y30+3oKf4Hju43Pca5B8MEYIT3Q/fAAVkld5ym2337oxjBgHPT8+Z5T3k5rOHiiymvsfV9dRgAMIrCwXqTnadN3QjZ9L8fl2ZsWYB4CdpeZI8NPOaovuh7U+g6yWcraIYCupDJ4FUlK+yQ= 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 1582716900594495.2299809843714; Wed, 26 Feb 2020 03:35: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 1j6uxF-0001BF-Q0; Wed, 26 Feb 2020 11:34:17 +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 1j6uxE-0001Ar-Vk for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:34:17 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e2ddc95a-588b-11ea-93fd-12813bfff9fa; Wed, 26 Feb 2020 11:34:01 +0000 (UTC) X-Inumbo-ID: e2ddc95a-588b-11ea-93fd-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582716841; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JzX7HZJXzphUcMN1byQmSarqS2k5PNItv5nAt1gTphg=; b=DJHcEAYB56FRtYPDguuJ1cmWIgC3RL1J3Fi/9jL4CIH3QC126TTOJeOp KeKICzzy/JD3Bhp0ja6dmCxSdpDon04/JW3ve50Cd8KgzQN7QzpPO7l3f 9mWq3HZbm4/a+0UUS9FzlQL5p4DolsPciAnq6OM50t4aPUV4CLar3SkKq 8=; 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: jPVB9Q3X+MDPOYYmBHNjRyNxdlxxGTLohPImXJcT1MppDyL7wppKMOfSlZh9Xx536nCgmSPNNJ TNMoDvP8IsfZeUdvZEoi9hKtZS3m5LX+NPlpKp3HPh1XIGBCNHsJbEbGMHxfWNOUt6rz1ENgv8 n1DE0BcjxEkXIWrU9B4mkpdLTyDcTfv1kCm1th/c1TDmFeH+6pM3Qu79KxvCgHcELThF9GGr4L kkn+Bmn+by3BTwwtPf534FAnqldOC3bisFMYfCL0388d09zvqQqKa6CjISvNZm+u6qhnOSzPws sLI= X-SBRS: 2.7 X-MesageID: 13461764 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,487,1574139600"; d="scan'208";a="13461764" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:41 +0000 Message-ID: <20200226113355.2532224-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 09/23] 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 patch makes running make clean much faster. The patch extract the clean target into a different Makefile, Makefile.clean. Since Makefile.clean, doesn't want to include Config.mk, we need to define the variables DEPS_INCLUDE and DEPS in a place common to Rules.mk and Makefile.clean, this is Kbuild.include. DEPS_RM is only needed in Makefile.clean so can be defined there. Even so Rules.mk includes Config.mk, it includes Kbuild.include after, so the effective definition of DEPS_INCLUDE is "xen/" one and the same one as used by Makefile.clean. This is inspired by Kbuild, with Makefile.clean partially copied from Linux v5.4. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v3: - rewrite of commit message - have only subdir-all, without intermediare variable subdir-y and subdir-n in Makefile.clean xen/Rules.mk | 12 ------------ xen/scripts/Kbuild.include | 7 ++++++- xen/scripts/Makefile.clean | 30 ++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 13 deletions(-) create mode 100644 xen/scripts/Makefile.clean diff --git a/xen/Rules.mk b/xen/Rules.mk index e3b19319b1f5..0c1a3ee5905d 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -100,8 +100,6 @@ SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 1= 6, \ =20 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk =20 -DEPS =3D .*.d - include Makefile =20 define gendep @@ -118,10 +116,6 @@ $(foreach o,$(filter-out %/,$(obj-y) $(obj-bin-y) $(ex= tra-y)),$(eval $(call gend subdir-y :=3D $(subdir-y) $(filter %/, $(obj-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) @@ -185,12 +179,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..53379e6102cc --- /dev/null +++ b/xen/scripts/Makefile.clean @@ -0,0 +1,30 @@ +# 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 clean from the various variables +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +subdir-all :=3D $(subdir-y) $(subdir-n) $(subdir-) \ + $(filter %/, $(obj-y) $(obj-n) $(obj-)) + +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 Mon Apr 29 05:18:05 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=1582717309; cv=none; d=zohomail.com; s=zohoarc; b=BnEs7XJSZK59brm7OTShxbi+sXqohP/aYIoFf/f0ojtMHUWYiS5H8NiDoG9EeCRxzW1XWh9rZ1ispzY1zUPGHkAmdftfna+V34e2rbxMs/tqnxBpcr8RH5USUen4TnQUemm8Fv2bY6SpA9MCxsVb6QW500ivWjfUrbjY1WvY0aU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717309; 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=XypVDJLnJqXizIT1N42Rs2c1UUXcbrq09N46JQKTSCQ=; b=E7NiBAHKPwiLkKLbLYm4u4jU1gbWhymQSEqz8Dk0tYZqsx3TFwJpugGSjn8H6Q7BbUpJZL603BSle8v+Ble6/ML0qCWY74qOzQXD0aJgFi83BMktuY52tdNACXN2ITj8b1a278BXy5wOBnWyl0KGVYHqAe6tZPEHvEUXGCCzfzE= 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 1582717309215368.01005589600754; Wed, 26 Feb 2020 03:41:49 -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 1j6v3z-0002xJ-4X; Wed, 26 Feb 2020 11:41:15 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6v3y-0002wf-50 for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:14 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e02df62a-588c-11ea-93ff-12813bfff9fa; Wed, 26 Feb 2020 11:41:06 +0000 (UTC) X-Inumbo-ID: e02df62a-588c-11ea-93ff-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717266; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8fbAOGCvYSNlg4dNjTF/BzN/yi+Nke3WzR16xOV8uYE=; b=AXclC4lHmwAxd3gkWsud9Hy8Gq3V9XinbqWNAvddPeUdWut/RYSgZoTE dChzk3wciV0B3c5DO6rVdJi4f7rOh741t7okEzzrCiTRSpJJ+jn0bJItL f+JCRPVewLCuIXKRIsJTpAhkAJ/j5dLS/clN7//IeeKSwPGsTpqkQ5+C1 o=; 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: 077nXT5xp0EANCF3XAk6Idusv0fl/sQa9sQ5w/95YtiI05R1dBmIZVOHFXPaMVI9WbNg7QP2Qr rcI6QQ55i8ci7RnBNl1HIvxbNeO7DGZSXHvp9u/RAyM+ypZosVypOY9ruz1tpcQdPWR+xXjJQj rdtueo2eAJXlBfHEk6PzMe8J1LPDAl8wFRbr+EXtddG7jioedC/HDB8OE4MiX94gL1pOvRiuGb s+fSdasJ4GY14FfiRuO2CdkqGkTtO8c2pbWXq3uazt/2QX/UzGYsMIHUe4rl4YPGKbCCdco/GJ +LQ= X-SBRS: 2.7 X-MesageID: 13462011 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,487,1574139600"; d="scan'208";a="13462011" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:42 +0000 Message-ID: <20200226113355.2532224-11-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 10/23] 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 allows to run more targets without Rules.mk. XEN_TARGET_ARCH is actually changed in arch/x86/boot/build32.mk, but it doesn't use the TARGET_{,SUB}ARCH variables either, and doesn't use Rules.mk (it replaces it). TARGET_{,SUB}ARCH are no longer overridden because that would have no effect on the values that Rules.mk will use. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v3: - Improve commit message, try to explain why override disappeared xen/Makefile | 25 +++++++++++++++---------- xen/Rules.mk | 5 ----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 65bd913cd133..10bc4bf3646c 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 @@ -223,25 +228,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 0c1a3ee5905d..92a13ca60163 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 Mon Apr 29 05:18:05 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=1582717305; cv=none; d=zohomail.com; s=zohoarc; b=dG8pEkA81zxYRUQhF38ikpnHjRaJLJGQ2L+4/u0OC7Ze2qkvK7hjWomBlVK38CF9aFDCWY5n0YRnSUErDvx7E5ZnFc5YkduRhKDGG1dDbFw0IYbrzPmUnZrx/UgSMS783XwC7YA09aRLLFv2rgZbUh7aj/ZY9cbN20fZrb2Gnzo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717305; 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=QXlTv5EpR/h3jvWEImD6r7yUX8PozJPm/WtWY+PiEVU=; b=WQFQMs4+JPqUOtD7VSzmpQSjBAmXZ8WVjg5Ml59Ards0CYRF2lWKXEB1+THX0RZRqVc80CKin7FCbBJee+8re1KnxSHHHcv3JZZxFq2ZHcKHynbPq3EXkDEMGdEG6lKUOHavJH+YP9gt+y3qaoR05PXzILnxRk6v89S5zvWIAKE= 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 1582717305768512.3001013666948; Wed, 26 Feb 2020 03:41:45 -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 1j6v3u-0002u8-GQ; Wed, 26 Feb 2020 11:41:10 +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 1j6v3t-0002td-4g for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:09 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id de2e7336-588c-11ea-93ff-12813bfff9fa; Wed, 26 Feb 2020 11:41:04 +0000 (UTC) X-Inumbo-ID: de2e7336-588c-11ea-93ff-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717264; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y1C3sq6ciml3sSWJH7FufJavHe1bHtiazhqc4dzppJs=; b=BiTpyhoqaHKHscgFLQwdrm8NgDuR5onYugsCljUDc7G5BR99xbM3bGpf aE89G0R2kcH5YseIIynmQ2X5f4YDnDKBbz6YmjrQLBCMnwW2KsFofiatu dLrdBnhZ7hRGInhJNvjW1+eNXYXvLqsvuf2NGotlwQBZAD9MUTkfWIgm4 w=; Authentication-Results: esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: Hq5zwvtxQ6dRTbcLc+q1L7THti5pS0RlOpScqeKW2aWHYvnyvT+HEXwZzbFCPNCA0JRP1F/I30 xZhYh1VuodvD7njQZMWh3CLyJnwaiMO8noLbfVl42tyApwsbPNzvtrtK19X6W8/DxqVOoInGE7 3bnrWrhwOHERa7tQaTNn/YoTWXo6h9c7bvQ+Pa6DKZzFRm2or9+q+7szKp7JYGaBe3f1QmTrp9 mPmtnP/6I4jmapQ6e1xHPnQ9i6bN4FQFKnVWRgdQghyDnbJJfkq7dzFokfUGcicJnAGpQJW5gn tPo= X-SBRS: 2.7 X-MesageID: 13012973 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,487,1574139600"; d="scan'208";a="13012973" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:43 +0000 Message-ID: <20200226113355.2532224-12-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 11/23] 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 10bc4bf3646c..8267ace51b0d 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 .PHONY: install-tests install-tests: --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582717314; cv=none; d=zohomail.com; s=zohoarc; b=SS8JV0UBkDtqQBErtrX+91QG1GnPxsJzWhbJGDYw/YMr7t1nQqhS3CVivtI4qjcX1jUpA8I46fH3+tJRFf+fmtxGM3tmfCUIcBykkxRtMFTHqTsrl1/XJ6z2OIoOWHJ+qtePHg9iy0cfcedfcCeZXdru67zialD1wrzkvc9kKZA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717314; 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=4nWcLebfYBbrYfXD2tqIa6nBgCTRpgKDwFt4KKE77sQ=; b=HAiqCEcdsS8Q/+gZI0Ch+mi8veMzp9GCb7csrNgu3TvyYxCd43fvz2BcVgS2RBp0n/AwPxjnqp0DcLjXiM2c4omQ4Uny9RI+qgOhz+Z4CubO4e7m35c2Ifkyp+0foeFF1rs/OAGCVENB33CyRDmLcWKQPekWYJkdNOxw23Nz7uE= 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 1582717314984109.83036667050567; Wed, 26 Feb 2020 03:41:54 -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 1j6v43-00030X-Dr; Wed, 26 Feb 2020 11:41:19 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6v41-0002z9-IQ for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:17 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e60f9efe-588c-11ea-8cb6-bc764e2007e4; Wed, 26 Feb 2020 11:41:17 +0000 (UTC) X-Inumbo-ID: e60f9efe-588c-11ea-8cb6-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717277; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FkubFNLMShkHJbU1MWkUBhmuCcJJA2wzYifkrSoaNbA=; b=cKbTtrBt1ZATl4iDtDD80QZRc8SzXv2hwOAWuNaLeYq7d5P34Tw3rrtf uDC+dmib6Y/7xN3n70GCVQpfl6peS5qr22Sj3zmqCBYuwkid3st1U6dV3 nQutzAiHcovGxUsi1EhO7XZ+K1W5Lg3F8ugPxCBaJuyXvU9I55DLvxgMd o=; 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: 4wB0MgZvYFSxrHh9eAwNjclA1Vu+nC96Jy4WgtjVnvMstUaIg8ilO5d3dXOv2AMxfAMtr/qXxs jj5E61tb8U9edrN3XEu9f3sfq964VtzP4B9g5O0aZNWs+Yd0EvTYNESzd7v82uHKwZIhnAinAh wRSmETeTpn7YEgaIEVtgxa1VcGy90FQFGD5/rlZbojaJlCIwktuDxHM0cHd96n08vK+Fxa2hzF 9oCtiCJFm2Foxv9cDZtShYhpbMJFuK/rgKUSvynIFiPpK1mqoDcLNHcGoP/SBCH5rmdn0MqvsJ jZU= X-SBRS: 2.7 X-MesageID: 13038475 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,487,1574139600"; d="scan'208";a="13038475" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:44 +0000 Message-ID: <20200226113355.2532224-13-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 12/23] xen/build: Move as-option-add to xen/ 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) Only xen/ uses as-option-add and as-insn, so there aren't needed in Config.mk. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v3: - new patch Config.mk | 17 ----------------- xen/scripts/Kbuild.include | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Config.mk b/Config.mk index 65649d6122d1..dc6e7d03dffe 100644 --- a/Config.mk +++ b/Config.mk @@ -143,23 +143,6 @@ ifndef XEN_HAS_CHECKPOLICY export XEN_HAS_CHECKPOLICY endif =20 -# as-insn: Check whether assembler supports an instruction. -# Usage: cflags-y +=3D $(call as-insn,CC FLAGS,"insn",option-yes,option-no) -as-insn =3D $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \ - | $(filter-out -M% %.d -include %/include/xen/confi= g.h,$(1)) \ - -c -x c -o /dev/null - 2>&1),$(4),$(3)) - -# as-option-add: Conditionally add options to flags -# Usage: $(call as-option-add,CFLAGS,CC,"insn",option-yes,option-no) -as-option-add =3D $(eval $(call as-option-add-closure,$(1),$(2),$(3),$(4),= $(5))) -define as-option-add-closure - ifeq ($$(call as-insn,$$($(2)) $$($(1)),$(3),y,n),y) - $(1) +=3D $(4) - else - $(1) +=3D $(5) - endif -endef - define buildmakevars2shellvars export PREFIX=3D"$(prefix)"; = \ export XEN_SCRIPT_DIR=3D"$(XEN_SCRIPT_DIR)"; = \ diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 6a9b0c39da53..806c68824ed5 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -7,6 +7,23 @@ DEPS =3D .*.d DEPS_INCLUDE =3D $(addsuffix .d2, $(basename $(wildcard $(DEPS)))) =20 +# as-insn: Check whether assembler supports an instruction. +# Usage: cflags-y +=3D $(call as-insn,CC FLAGS,"insn",option-yes,option-no) +as-insn =3D $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \ + | $(filter-out -M% %.d -include %/include/xen/confi= g.h,$(1)) \ + -c -x c -o /dev/null - 2>&1),$(4),$(3)) + +# as-option-add: Conditionally add options to flags +# Usage: $(call as-option-add,CFLAGS,CC,"insn",option-yes,option-no) +as-option-add =3D $(eval $(call as-option-add-closure,$(1),$(2),$(3),$(4),= $(5))) +define as-option-add-closure + ifeq ($$(call as-insn,$$($(2)) $$($(1)),$(3),y,n),y) + $(1) +=3D $(4) + else + $(1) +=3D $(5) + endif +endef + # 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)) --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582717324; cv=none; d=zohomail.com; s=zohoarc; b=dxQ6Kv655ogNmlt2wUxgyQQEW3Nt9I+WQSN2FtkvMRZMzAv6WK52885C97HNzXs0r4ebixRv/KZsGaqLvXLPmS8L/wyAMWT6WuW/Ywe+A1s72ghGKGA6+LyhKmvAkA2syn0qUDNaV2uxo1oiWTcVGPG5bGKhXG6U38O73GBK3Xo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717324; 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=h2ea8NvRBLYz83YLo7wcVyGXeO4Ky3uWLQuXGSqT7GY=; b=oCY2WAGzEHyfzEn3RC13oYy4anlA/m54nqvV4TZAGQn0jBW9SchfGYru528o1A7hpqiwrbHGe/S4oeZZplyEmzF64s8NVq9fvMJ41xDTiAVUoa2X+ETfSJ0sVXXYrjcmeBk2KA14QCgVk1+o7nRnwpYZyVFHSoxLujsXyQzKoVE= 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 1582717324907827.0792515433459; Wed, 26 Feb 2020 03:42:04 -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 1j6v48-00037J-Tr; Wed, 26 Feb 2020 11:41:24 +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 1j6v48-00036O-5C for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:24 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e575392c-588c-11ea-93ff-12813bfff9fa; Wed, 26 Feb 2020 11:41:16 +0000 (UTC) X-Inumbo-ID: e575392c-588c-11ea-93ff-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717276; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=m1wxR+qvLrsqJ0mh/T5a67KjvKLUwVnGvO5/6QsJZ1I=; b=FT5SDkVt4XoZvmadGKMuBoLodSYyKcU5Q1o5DPdLT5/Z3f+ph7J7GXAW G0LhGxFT9UDTIrQvzrnOvhKpQEXqlJkQDO/jdrqd2WDsbcx4R1RS8Mstd hB/CUopD4hhnrxEuONkmVbLZCPfGsdAsGtF4Nng2FVjYtEVx5Piboz8Uo U=; Authentication-Results: esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 4l+D9aQRMx+xA6l/T1BtMoIHZ7ez2IeBJALpmnsWkKRSR3guAv7gxSwHGRTZyD4NRleOnFs9Rd ea636jz3RQsKJxIyxQ2V7EqDEvOKrvEYGa/qN9GDvBmKy/8re+KY0MCEoiFOkmMgsbwqQzBm5q +gckWdNdDU86iLYd7s0n1GF3bai2Bgu7+/jZVHHRdy4Yh/0EKAGpTSIlu29k0NTOA1Fi+4HwBV SiAN+Mioys2CDzYTNd/KlvqqqJPvNZwXsUyF93CIkMAlhG7/muL+aI4KVLu2gzWsiypTAQIHYI NF0= X-SBRS: 2.7 X-MesageID: 13012983 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,487,1574139600"; d="scan'208";a="13012983" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:45 +0000 Message-ID: <20200226113355.2532224-14-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 13/23] 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. We are introducing a target %config to catch all targets for kconfig. So we need an extra target %/.config to prevent make from trying to regenerate $(XEN_ROOT)/.config that is included in Config.mk. The way targets are filtered is inspired 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 --- Notes: v3: - filter only for %config instead of both config %config - keep the multi-target pattern rule trick for include/config/auto.conf instead of using Linux's newer pattern (we dont have tristate.conf so don't need to change it) - use y/n for root-make-done, config-build, need-config instead of relying on ifdef and ifndef and on assigning an empty value meaning undef - use space for indentation - explain why %/.config is suddenly needed. xen/Makefile | 96 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 73 insertions(+), 23 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 8267ace51b0d..a6120e577e9b 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -49,7 +49,71 @@ default: build .PHONY: dist dist: install =20 -build install:: include/config/auto.conf + +ifeq ($(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 n +need-config :=3D y + +ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),) + ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),) + need-config :=3D n + endif +endif + +ifneq ($(filter %config,$(MAKECMDGOALS)),) + config-build :=3D y +endif + +export root-make-done :=3D y +endif # root-make-done + +ifeq ($(config-build),y) +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D +# *config targets only - make sure prerequisites are updated, and descend +# in tools/kconfig to make the *config target + +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 + +ifeq ($(need-config),y) +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. +include/config/%.conf include/config/%.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:: @@ -254,9 +318,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 @@ -277,25 +338,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)) @@ -307,3 +349,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 Mon Apr 29 05:18:05 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=1582717325; cv=none; d=zohomail.com; s=zohoarc; b=S489B9lwsM9z96+ftNmb5IM+nhyJB573QW38Ce+NJ/pviDC5QPeUvc2R0o+OE3DiDfjw4X8kdd31no0HkHKeKXWbAmvCZ4c6XP+riWVGzRCzHR2JEqNDQyBK71FBoQMWo4dBYjquI5NfTYXwIGp6nMbg51juB6EYTVCxK/2GKBI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717325; 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=iLdAgQszhSJNVd9pQ/FGeLqvEKFDDx0b2JrKuuaSSog=; b=T5E+UFquN8dO1e8v6xO/30bgmHgSqwjvp0cpggPHzHfsrRad2KDygf8bbbcL6WLWYkOH6aNqDXigq3oTPfQavXw+4fgkz2SqJo+Ltw2i1pLbgYlC0kkvzwh1KvKo6EtOn9rBqELpgL4gJqJUxEESwLVvFUvYi+MaaJCR/rL4CqY= 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 1582717325094216.79767623736313; Wed, 26 Feb 2020 03:42:05 -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 1j6v43-000318-Rt; Wed, 26 Feb 2020 11:41:19 +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 1j6v43-00030F-4v for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:19 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e4de0214-588c-11ea-93ff-12813bfff9fa; Wed, 26 Feb 2020 11:41:15 +0000 (UTC) X-Inumbo-ID: e4de0214-588c-11ea-93ff-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717276; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dEgAZNZYhTnd0TQMmYyknRi8n/txItO2A6gAh4+hThw=; b=MoU2rljDS4vey8B1h4TCh6jwUF8CUyP7HM5EJzejA5bM4vr7zwRorHcu mQWtIEFmS3eIHSZ65vkGtfkaOpPaPa7yXl72gH52BPv9aIuRPTakNrkv/ oW7Ttx9tgcQReGlbcr+6L6iC2YGLcCDN9DiZ7Tujq+JdVILzsF3L9odnh I=; Authentication-Results: esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.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=esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: MnLejxobn7vsEcgrOI65frnBSe3cR13jlT1mxV6ninQtQ9IY+GanPMPouc0+dON+GvT5KruTkJ AkMzrfk6Nvuto4LZ1RYMz/fpNsLfbll6e/c3Q2yw1mYI/A9QCCwyl1tyzBSFJbELa8zJ4g1ANZ fmhRFVz4Zs9eVunfUV9APqaBI/E5/Q34lfXkxPofW7fMtV9/kQS4MqM5T9oWMhseC2gTa5A9aR ytWPbKmAYmIpCD94aPJwnw1qA5UrFCReUR+DuWnekpF/XraS5s00oIHsJg0VKp9c02vcuIq0Dz 3rs= X-SBRS: 2.7 X-MesageID: 13211256 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,487,1574139600"; d="scan'208";a="13211256" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:46 +0000 Message-ID: <20200226113355.2532224-15-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 14/23] 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 In a later patch ("xen/build: have the root Makefile generates the CFLAGS), we want to generate the CFLAGS in xen/Makefile, then export it and have Rules.mk use a CFLAGS from the environment variables. That changes the flavor of the CFLAGS and flags intended for one target (like -D__OBJECT_FILE__ and -M%) gets propagated and duplicated. So we start by moving such flags out of $(CFLAGS) and into $(c_flags) which is to be modified by only Rules.mk. __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). For include/Makefile and as-insn we can keep using CFLAGS, but since it doesn't have -M* flags anymore there is no need to filter them out. 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. CFLAGS doesn't have those flags anymore, so no filtering is needed. This is inspired by the way Kbuild generates CFLAGS for each targets. Signed-off-by: Anthony PERARD Reviewed-by: Roger Pau Monn=C3=A9 --- Notes: v3: - include/Makefile: Keep using CFLAGS, but since it doesn't have -M* flags anymore, no need to filter it. - Write c_flags and a_flags on a single line. - arch/x86/Makefile: remove the filter-out of dependency flags they are remove from CFLAGS anyway. (was intended to be done in xen/build: have the root Makefile generates the CFLAGS originally, move the change to this patch). - also modify as-insn as it is now xen/ only. xen/Rules.mk | 23 +++++++++++------------ 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 +- xen/scripts/Kbuild.include | 2 +- 8 files changed, 27 insertions(+), 28 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 92a13ca60163..4aa119a90c27 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 +=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) @@ -146,9 +142,12 @@ 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),$^) @@ -159,7 +158,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 @@ -178,7 +177,7 @@ SRCPATH :=3D $(patsubst $(BASEDIR)/%,%,$(CURDIR)) =20 %.o: %.c Makefile ifeq ($(CONFIG_ENFORCE_UNIQUE_SYMBOLS),y) - $(CC) $(CFLAGS) -c $< -o $(@D)/.$(@F).tmp -MQ $@ + $(CC) $(c_flags) -c $< -o $(@D)/.$(@F).tmp -MQ $@ ifeq ($(CONFIG_CC_IS_CLANG),y) $(OBJCOPY) --redefine-sym $<=3D$(SRCPATH)/$< $(@D)/.$(@F).tmp $@ else @@ -186,11 +185,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 $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.init.o: %.o Makefile $(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | while read idx name s= z rest; do \ @@ -205,12 +204,12 @@ $(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 %.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 ed709e2373ac..7fbac8ac525d 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) $(CFLAGS) -c efi/check.c -o efi/ch= eck.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 @@ -226,7 +226,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 @@ -243,7 +243,7 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i M= akefile =20 efi.lds: AFLAGS +=3D -DEFI xen.lds efi.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 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..a488a98d8bb7 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)% -include %/include/xen/config.h,$(CFLAGS= )) $(cppflags-y) -o $@ $< =20 compat/%.c: public/%.h xlat.lst Makefile $(BASEDIR)/tools/compat-build-sou= rce.py mkdir -p $(@D) diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 806c68824ed5..14bd4e110b45 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -10,7 +10,7 @@ DEPS_INCLUDE =3D $(addsuffix .d2, $(basename $(wildcard $= (DEPS)))) # as-insn: Check whether assembler supports an instruction. # Usage: cflags-y +=3D $(call as-insn,CC FLAGS,"insn",option-yes,option-no) as-insn =3D $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \ - | $(filter-out -M% %.d -include %/include/xen/confi= g.h,$(1)) \ + | $(filter-out -include %/include/xen/config.h,$(1)= ) \ -c -x c -o /dev/null - 2>&1),$(4),$(3)) =20 # as-option-add: Conditionally add options to flags --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582717331; cv=none; d=zohomail.com; s=zohoarc; b=EXZ8gZ1OQhMAXFx6XjAipU2VOGo2GCisX5GEWICGBWFLq8+9rw2bqUSmG0ciQAbdAmuq60ovbXiTaCErIDs2uurj3qDV6Nh/BGfma0DtOdz5v93Ps6o0DEnjHpClamvXRcaREa0ZZgD8iK9mARbcTig5QjaLB4AZqSBf68rb+O4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717331; 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=0D2rqE4mZvmIb+/u9LD8bLr4lG0CzkG7Y7wkuiSNQeM=; b=advY39IbymstWha4kw9Y2sbwxaAJswKj0ogexECZbtisjCt1xYmoEP2griHS78o+ptkOn6mcMosMT2sL/mDF9xKLYTG1FhscJET8UTWpwwFetzomdbQBdQuPZhf1jDH+vOG1/+XLefHlIuZ2NMdSvwKxi5NbWw6IF+RH/kjPz7c= 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 1582717331590470.9901668286443; Wed, 26 Feb 2020 03:42:11 -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 1j6v47-000353-9j; Wed, 26 Feb 2020 11:41:23 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6v45-00033W-S7 for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:21 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e70b1aea-588c-11ea-aba8-bc764e2007e4; Wed, 26 Feb 2020 11:41:18 +0000 (UTC) X-Inumbo-ID: e70b1aea-588c-11ea-aba8-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717278; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6tPP7TgfUk2yI33aXx5gu6IRlHKsQ7xboXclcuns7ps=; b=hcLzCRxcIYoRkOo+hjAs6VGelkBbU8eHWT5lYiDFTZGx7bOo1M+oTELR vvNn41zG9nvDDbboMszC6RkFlnWgUBA/CXYgx96QF27tuouQA2cp5YjSl G80OZJDWW/Jryt1ZuKSlR1KZCUwR4AG/Dx1G+NyJsDOueMIjDf+ZopAmr A=; 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: 6+IFUdvJGbW9rdYp98+LGT3fDAQO8WnjlmkNAwCV3F9HR2mBveRtXU7IBZQWU02dprOxPVJWFg W7tBUhSK/qhaCuaSCsZ21LZqaO+4PzjpUkoJDdRMLFpQtzE06kblPbybf6JL8Ff29ntUgxA3r0 +Qx+ibAH9eiARJVK7pOoc3w8xGc3bxS4WBXnHNbYQsnTwApD9Kb3puOiAaeZpj23qiuhu+chkX OldGbITAVavqOFXHgLZTp/kXtRahDgEH0Phn4v5/6b+ay0XWZRZrgYBlah67ISpLvFr+uG7Fwm PC8= X-SBRS: 2.7 X-MesageID: 13385569 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,487,1574139600"; d="scan'208";a="13385569" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:47 +0000 Message-ID: <20200226113355.2532224-16-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 15/23] 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 , 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) 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. We export the *FLAGS via the environment variables XEN_*FLAGS because Rules.mk still includes Config.mk and would add duplicated flags to CFLAGS. 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. We can't use CFLAGS in subdirectories to add flags to particular targets, instead start to use CFLAGS-y. Idem for AFLAGS. So there are two different CFLAGS-y, the one in xen/Makefile (and arch.mk), and the one in subdirs that Rules.mk is going to use. We can't add to XEN_CFLAGS because it is exported, so making change to it might be propagated to subdirectory which isn't intended. Some style change are introduced in this patch: when LDFLAGS_DIRECT is included in LDFLAGS use of CFLAGS-$(CONFIG_INDIRECT_THUNK) instead of ifeq(). 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 --- Notes: v3: - squash "xen/build: introduce ccflags-y and CFLAGS_$@" here, with those changes: - rename ccflags-y to simply CFLAGS-y and start using AFLAGS-y in subdirs. - remove CFLAGS_$@, we don't need it yet. - fix build of xen.lds and efi.lds which needed -D to be a_flags - remove arch_ccflags, and modify c_flags directly with that change, reorder c_flags, so that target specific flags are = last. - remove HAVE_AS_QUOTED_SYM from envvar and check XEN_CFLAGS to find if it's there when adding -D__OBJECT_LABEL__. - fix missing some flags in AFLAGS (like -fshort-wchar in xen/arch/x86/efi/Makefile, and -D__OBJECT_LABEL__ and CFLAGS-stack-boundary) - keep COV_FLAGS generation in Rules.mk since it doesn't invovle to call CC - fix clang test for "asm()-s support .include." (in a new patch done ahead) - include Kconfig.include in xen/Makefile because as-option-add is defined there now. xen/Makefile | 60 ++++++++++++++++++++++++ xen/Rules.mk | 74 ++++++++---------------------- xen/arch/arm/Makefile | 10 ++-- xen/arch/arm/Rules.mk | 93 -------------------------------------- xen/arch/arm/arch.mk | 88 ++++++++++++++++++++++++++++++++++++ xen/arch/arm/efi/Makefile | 2 +- xen/arch/x86/Makefile | 24 +++++----- xen/arch/x86/Rules.mk | 91 +++---------------------------------- xen/arch/x86/arch.mk | 84 ++++++++++++++++++++++++++++++++++ xen/arch/x86/efi/Makefile | 2 +- xen/common/libelf/Makefile | 4 +- xen/common/libfdt/Makefile | 4 +- xen/include/Makefile | 2 +- xen/xsm/flask/Makefile | 2 +- xen/xsm/flask/ss/Makefile | 2 +- 15 files changed, 283 insertions(+), 259 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 a6120e577e9b..da017dc29d36 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -94,6 +94,8 @@ config: FORCE =20 else # !config-build =20 +include scripts/Kbuild.include + ifeq ($(need-config),y) include include/config/auto.conf # Read in dependencies to all Kconfig* files, make sure to run syncconfig = if @@ -113,6 +115,64 @@ $(KCONFIG_CONFIG): include/config/%.conf include/config/%.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 +=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 $(filter-out -std=3Dgnu% -flto,$(CFLAGS)) + +# LDFLAGS are only passed directly to $(LD) +LDFLAGS +=3D $(LDFLAGS_DIRECT) $(LDFLAGS-y) + +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 CFLAGS_UBSAN + endif # need-config =20 .PHONY: build install uninstall clean distclean MAP diff --git a/xen/Rules.mk b/xen/Rules.mk index 4aa119a90c27..f1311c45a372 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -38,59 +38,17 @@ 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 - -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 +=3D -D__ASSEMBLY__ +CFLAGS-y :=3D +AFLAGS-y :=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 $(filter-out -std=3Dgnu% -flto,$(CFLAGS)) - -# LDFLAGS are only passed directly to $(LD) -LDFLAGS +=3D $(LDFLAGS_DIRECT) - -LDFLAGS +=3D $(LDFLAGS-y) - SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16, \ $(foreach w,1 2 4, \ rodata.str$(w).$(a= )) \ rodata.cst$(a)) \ $(foreach r,rel rel.ro,data.$(r).local) =20 -include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk - include Makefile =20 define gendep @@ -107,7 +65,7 @@ $(foreach o,$(filter-out %/,$(obj-y) $(obj-bin-y) $(extr= a-y)),$(eval $(call gend subdir-y :=3D $(subdir-y) $(filter %/, $(obj-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)): CFLAGS-y +=3D -DINIT_= SECTIONS_ONLY =20 ifeq ($(CONFIG_COVERAGE),y) ifeq ($(CONFIG_CC_IS_CLANG),y) @@ -115,19 +73,16 @@ ifeq ($(CONFIG_CC_IS_CLANG),y) 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)): CFLAGS= -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)) +CFLAGS-y +=3D $(filter-out -fno-%,$(CFLAGS_UBSAN)) $(filter -fno-%,$(CFLAG= S_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. @@ -140,10 +95,19 @@ 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)) + +# Calculation of flags, first the generic flags, then the arch specific fl= ags, +# and last the flags modified for a target or a directory. + +c_flags =3D -MMD -MF $(@D)/.$(@F).d $(XEN_CFLAGS) '-D__OBJECT_FILE__=3D"$@= "' +a_flags =3D -MMD -MF $(@D)/.$(@F).d $(XEN_AFLAGS) + +include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk =20 -c_flags =3D -MMD -MF $(@D)/.$(@F).d $(CFLAGS) '-D__OBJECT_FILE__=3D"$@"' -a_flags =3D -MMD -MF $(@D)/.$(@F).d $(AFLAGS) +c_flags +=3D $(CFLAGS-y) +a_flags +=3D $(CFLAGS-y) $(AFLAGS-y) =20 built_in.o: $(obj-y) $(extra-y) ifeq ($(obj-y),) @@ -152,7 +116,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 @@ -160,7 +124,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/arm/efi/Makefile b/xen/arch/arm/efi/Makefile index d34c9168914a..e3ff2c3f283c 100644 --- a/xen/arch/arm/efi/Makefile +++ b/xen/arch/arm/efi/Makefile @@ -1,4 +1,4 @@ -CFLAGS +=3D -fshort-wchar +CFLAGS-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 7fbac8ac525d..5de873cf693e 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) @@ -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) $(CFLAGS) -c efi/check.c -o efi/ch= eck.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)) CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI @@ -181,7 +181,7 @@ $(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) efi/relocs-= dummy.o | sed -n 's, A ALT_ =20 ifneq ($(build_id_linker),) ifeq ($(call ld-ver-build-id,$(LD) $(filter -m%,$(EFI_LDFLAGS))),y) -CFLAGS +=3D -DBUILD_ID_EFI +CFLAGS-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 @@ -228,7 +228,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 +asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P =20 $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i Makefile echo '#if 0' >$@.new @@ -241,7 +241,7 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i M= akefile echo '#endif' >>$@.new $(call move-if-changed,$@.new,$@) =20 -efi.lds: AFLAGS +=3D -DEFI +efi.lds: AFLAGS-y +=3D -DEFI xen.lds efi.lds: xen.lds.S $(CC) -P -E -Ui386 $(filter-out -Wa$(comma)%,$(a_flags)) -o $@ $< sed -e 's/.*\.lds\.o:/$(@F):/g' <.$(@F).d >.$(@F).d.new diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index 4b7ab784670c..56fe22c979ea 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-x86/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 +ifneq ($(filter -DHAVE_AS_QUOTED_SYM,$(XEN_CFLAGS)),) +object_label_flags =3D '-D__OBJECT_LABEL__=3D$(subst $(BASEDIR)/,,$(CURDIR= ))/$@' +else +object_label_flags =3D '-D__OBJECT_LABEL__=3D$(subst /,$$,$(subst -,_,$(su= bst $(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 - +c_flags +=3D $(object_label_flags) $(CFLAGS-stack-boundary) +a_flags +=3D $(object_label_flags) $(CFLAGS-stack-boundary) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk new file mode 100644 index 000000000000..2a51553edb3c --- /dev/null +++ b/xen/arch/x86/arch.mk @@ -0,0 +1,84 @@ +######################################## +# 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-x86/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",-DHAVE_AS_QUOTED_SYM) +$(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. +CFLAGS-$(CONFIG_INDIRECT_THUNK) +=3D -mindirect-branch=3Dthunk-extern +CFLAGS-$(CONFIG_INDIRECT_THUNK) +=3D -mindirect-branch-register +CFLAGS-$(CONFIG_INDIRECT_THUNK) +=3D -fno-jump-tables + +# 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/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile index 4bc0a196e9ca..490d791aae2d 100644 --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -1,4 +1,4 @@ -CFLAGS +=3D -fshort-wchar +CFLAGS-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..464c448d9d37 100644 --- a/xen/common/libelf/Makefile +++ b/xen/common/libelf/Makefile @@ -3,10 +3,10 @@ nocov-y +=3D libelf.o =20 SECTIONS :=3D text data $(SPECIAL_DATA_SECTIONS) =20 -CFLAGS +=3D -Wno-pointer-sign +CFLAGS-y +=3D -Wno-pointer-sign =20 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 c075bbf5462a..e2a5e59380a0 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -5,10 +5,10 @@ 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/ +CFLAGS-y +=3D -I$(BASEDIR)/include/xen/libfdt/ =20 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 $@ $^ diff --git a/xen/include/Makefile b/xen/include/Makefile index a488a98d8bb7..2a10725d689b 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)% -include %/include/xen/config.h,$(CFLAGS= )) $(cppflags-y) -o $@ $< + $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CF= LAGS)) $(cppflags-y) -o $@ $< =20 compat/%.c: public/%.h xlat.lst Makefile $(BASEDIR)/tools/compat-build-sou= rce.py mkdir -p $(@D) diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index b1fd45421993..011ef5ca91f8 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 +CFLAGS-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..d32b9e07138e 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 +CFLAGS-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 Mon Apr 29 05:18:05 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=1582717299; cv=none; d=zohomail.com; s=zohoarc; b=QdK/X+TA4c8jtKW0OE3ZRyOD9ugjbPGITW+nJQ0yukuKGUeNpsdj6JejrDZZZ95gqG5Q5gm26mNysKK6BrkUQfBZJ3yX3snHbnoaC8omdaJe7dJZbjhs75rH0b1wEJx87Fw70fMI+hNaxahuP9oABF0dh7C49scHk0AerMjbirs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717299; 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=hoQNjl4wB0GELxxlop/SaueewhIJq5ev3N2SrcWcFpc=; b=G+fxo5B7TbkR06VTCBh51TwmSx0zq2g70wvFpDN6eGi7u/0rmDqLR7f561TEeHpEKfJGVAiFc3WjkyLMz3o1LD8mASlrSfJpWY6httAhxID21Rr66peKU8iTMcRxq8lrU3bD66VHrXcku9AQ6b6RxK5YplIlqD+k6jIKepPWpJw= 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 1582717299221550.4997033472216; Wed, 26 Feb 2020 03:41:39 -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 1j6v3k-0002rA-Es; Wed, 26 Feb 2020 11:41:00 +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 1j6v3j-0002r5-5z for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:40:59 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id da77f780-588c-11ea-93ff-12813bfff9fa; Wed, 26 Feb 2020 11:40:57 +0000 (UTC) X-Inumbo-ID: da77f780-588c-11ea-93ff-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717257; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=doQK3s5pI+qjw5dpz3WGVz5y0EayaounLL0Eu1jgXW0=; b=iMdf0krr3R9nQlKiQmNv5qRLdbFsAQW2oG9u0bMr5l/eL3ZtdTEwmr4F F9fdPoNCTkYezQNruifLgUrA88JHrKBGZ/uvVrpw2zVKNGqIpKeHc1Qq1 UbRc3SyJf0SOwVr4OQnEIkDwHMRcP+j4MqwxwfyVAhKcrTnRs0TL8QgfD s=; 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: YUy/HLyt8levPAhCrFEfEdi4VMCILD6ZLmISmjVR5S4LW2LFn1FjLp80aH4bxw81eHyixMLu6H yIsKYPxOF5otaozAefwi3Scxd8LJvVhdc3GVSmhx4+lW6CLTnexRDzMpxuE59bMFukV3vZsbt5 hIk7/m29pzmZuoNoOfxr5xLmrMfgdnjkw3fNBYYnc9IJM+Nq3CaWblYTnuI5OUS8pvhPk7NlHb fnjDW2jx+8ab7nukLgBf1s6pm/IpEoq5CW3PejG1EMkGiLUk25LzOl8u8+7toc2NatiDN+rn7Q /rQ= X-SBRS: 2.7 X-MesageID: 13385560 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,487,1574139600"; d="scan'208";a="13385560" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:48 +0000 Message-ID: <20200226113355.2532224-17-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 16/23] xen/build: introduce if_changed and if_changed_rule 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) The if_changed macro from Linux can record the command used to build a target then compare it on rebuild. Thus if a command has changed, for example due to introducing new flags in CFLAGS or due to using a different compiler, the target will be rebuilt. if_changed_rule checks dependencies like if_changed, but execute rule_$(1) instead of cmd_$(1) when the command is different. A rule_ macro can call more than one cmd_ macro. One of the cmd_ macro in a rule need to be call using a macro that record the command line, so cmd_and_record is introduced. It is similar to cmd_and_fixup from Linux but without a call to fixdep which we don't have yet. (We will later replace cmd_and_record by cmd_and_fixup.) Example of a rule_ macro: define rule_cc_o_c $(call cmd_and_record,cc_o_o) $(call cmd,objcopy) endef This needs one of the call to use cmd_and_record, otherwise no .*.cmd file will be created, and the target will keep been rebuilt. In order for if_changed to works correctly, we need to load the .%.cmd files that the macro generates, this is done by adding targets in to the $(targets) variable. We use intermediate_targets to add %.init.o dependency %.o to target since there aren't in obj-y. We also add $(MAKECMDGOALS) to targets so that when running for example `make common/memory.i`, make will load the associated .%.cmd dependency file. Beside the if_changed*, we import the machinery used for a "beautify output". The important one is when running make with V=3D2 which help to debug the makefiles by printing why a target is been rebuilt, via the $(echo-why) macro. if_changed and if_changed_rule aren't used yet. Most of this code is copied from Linux v5.4. Signed-off-by: Anthony PERARD --- .gitignore | 1 + xen/Makefile | 53 +++++++++++++++++- xen/Rules.mk | 33 +++++++++++- xen/scripts/Kbuild.include | 107 +++++++++++++++++++++++++++++++++++++ 4 files changed, 192 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4ca679ddbc9a..c73f9f480780 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *.o *.d *.d2 +.*.cmd *.opic *.a *.so diff --git a/xen/Makefile b/xen/Makefile index da017dc29d36..fbd087e6f360 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -52,7 +52,57 @@ dist: install =20 ifeq ($(root-make-done),) # section to run before calling Rules.mk, but only once. + +# Beautify output +# ------------------------------------------------------------------------= --- +# +# Normally, we echo the whole command before executing it. By making +# that echo $($(quiet)$(cmd)), we now have the possibility to set +# $(quiet) to choose other forms of output instead, e.g. +# +# quiet_cmd_cc_o_c =3D Compiling $(RELDIR)/$@ +# cmd_cc_o_c =3D $(CC) $(c_flags) -c -o $@ $< +# +# If $(quiet) is empty, the whole command will be printed. +# If it is set to "quiet_", only the short version will be printed. +# If it is set to "silent_", nothing will be printed at all, since +# the variable $(silent_cmd_cc_o_c) doesn't exist. +# +# A simple variant is to prefix commands with $(Q) - that's useful +# for commands that shall be hidden in non-verbose mode. # +# $(Q)ln $@ :< +# +# If KBUILD_VERBOSE equals 0 then the above command will be hidden. +# If KBUILD_VERBOSE equals 1 then the above command is displayed. +# +# To put more focus on warnings, be less verbose as default +# Use 'make V=3D1' to see the full commands + +ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE =3D $(V) +endif +ifndef KBUILD_VERBOSE + KBUILD_VERBOSE =3D 0 +endif + +ifeq ($(KBUILD_VERBOSE),1) + quiet =3D + Q =3D +else + quiet=3Dquiet_ + Q =3D @ +endif + +# If the user is running make -s (silent mode), suppress echoing of +# commands + +ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) + quiet=3Dsilent_ +endif + +export quiet Q KBUILD_VERBOSE + # To make sure we do not include .config for any of the *config targets # catch them early, and hand them over to tools/kconfig/Makefile =20 @@ -258,7 +308,8 @@ _clean: delete-unfresh-files $(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 {} \; + find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \ + -o -name "*.gcno" -o -name ".*.cmd" \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map *~ core rm -f include/asm-*/asm-offsets.h rm -f .banner diff --git a/xen/Rules.mk b/xen/Rules.mk index f1311c45a372..8807a2e21c94 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -38,6 +38,7 @@ ALL_OBJS-y +=3D $(BASEDIR)/arch/$(TARGET_AR= CH)/built_in.o ALL_OBJS-$(CONFIG_CRYPTO) +=3D $(BASEDIR)/crypto/built_in.o =20 # Initialise some variables +targets :=3D CFLAGS-y :=3D AFLAGS-y :=3D =20 @@ -65,6 +66,10 @@ $(foreach o,$(filter-out %/,$(obj-y) $(obj-bin-y) $(extr= a-y)),$(eval $(call gend subdir-y :=3D $(subdir-y) $(filter %/, $(obj-y)) obj-y :=3D $(patsubst %/, %/built_in.o, $(obj-y)) =20 +# $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to +# tell kbuild to descend +subdir-obj-y :=3D $(filter %/built_in.o, $(obj-y)) + $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS-y +=3D -DINIT_= SECTIONS_ONLY =20 ifeq ($(CONFIG_COVERAGE),y) @@ -120,6 +125,10 @@ else endif endif =20 +targets +=3D built_in.o +targets +=3D $(filter-out $(subdir-obj-y), $(obj-y)) $(extra-y) +targets +=3D $(MAKECMDGOALS) + built_in_bin.o: $(obj-bin-y) $(extra-y) ifeq ($(obj-bin-y),) $(CC) $(a_flags) -c -x assembler /dev/null -o $@ @@ -128,7 +137,7 @@ else endif =20 # Force execution of pattern rules (for which PHONY cannot be directly use= d). -.PHONY: FORCE +PHONY +=3D FORCE FORCE: =20 %/built_in.o: FORCE @@ -176,4 +185,26 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %= .init.o: %.o Makefile %.s: %.S Makefile $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) $< -o $@ =20 +# Add intermediate targets: +# When building objects with specific suffix patterns, add intermediate +# targets that the final targets are derived from. +intermediate_targets =3D $(foreach sfx, $(2), \ + $(patsubst %$(strip $(1)),%$(sfx), \ + $(filter %$(strip $(1)), $(targets)))) +# %.init.o <- %.o +targets +=3D $(call intermediate_targets, .init.o, .o) + -include $(DEPS_INCLUDE) + +# Read all saved command lines and dependencies for the $(targets) we +# may be building above, using $(if_changed{,_dep}). As an +# optimization, we don't need to read them if the target does not +# exist, we will rebuild anyway in that case. + +existing-targets :=3D $(wildcard $(sort $(targets))) + +-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) + +# Declare the contents of the PHONY variable as phony. We keep that +# information in a variable so we can use it in if_changed and friends. +.PHONY: $(PHONY) diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 14bd4e110b45..f24d664db5ff 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -2,11 +2,30 @@ #### # kbuild: Generic definitions =20 +# Convenient variables +squote :=3D ' +empty :=3D +space :=3D $(empty) $(empty) +space_escape :=3D _-_SPACE_-_ +pound :=3D \# + +### +# Name of target with a '.' as filename prefix. foo/bar.o =3D> foo/.bar.o +dot-target =3D $(@D)/.$(@F) + ### # dependencies DEPS =3D .*.d DEPS_INCLUDE =3D $(addsuffix .d2, $(basename $(wildcard $(DEPS)))) =20 +### +# real prerequisites without phony targets +real-prereqs =3D $(filter-out $(PHONY), $^) + +### +# Escape single quote for use in echo statements +escsq =3D $(subst $(squote),'\$(squote)',$1) + # as-insn: Check whether assembler supports an instruction. # Usage: cflags-y +=3D $(call as-insn,CC FLAGS,"insn",option-yes,option-no) as-insn =3D $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \ @@ -32,3 +51,91 @@ cc-ifversion =3D $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $= (2)000 ] && echo $(3) || e # Usage: # $(MAKE) $(clean) dir clean :=3D -f $(BASEDIR)/scripts/Makefile.clean clean -C + +# echo command. +# Short version is used, if $(quiet) equals `quiet_', otherwise full one. +echo-cmd =3D $(if $($(quiet)cmd_$(1)),\ + echo ' $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';) + +# printing commands +cmd =3D @set -e; $(echo-cmd) $(cmd_$(1)) + +### +# if_changed - execute command if any prerequisite is newer than +# target, or command line has changed +# if_changed_rule - as if_changed but execute rule instead + +ifneq ($(KBUILD_NOCMDDEP),1) +# Check if both commands are the same including their order. Result is emp= ty +# string if equal. User may override this check using make KBUILD_NOCMDDEP= =3D1 +cmd-check =3D $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_= $@))), \ + $(subst $(space),$(space_escape),$(strip $(cmd_$1= )))) +else +cmd-check =3D $(if $(strip $(cmd_$@)),,1) +endif + +# Replace >$< with >$$< to preserve $ when reloading the .cmd file +# (needed for make) +# Replace >#< with >$(pound)< to avoid starting a comment in the .cmd file +# (needed for make) +# Replace >'< with >'\''< to be able to enclose the whole string in '...' +# (needed for the shell) +make-cmd =3D $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd= _$(1))))) + +# Find any prerequisites that is newer than target or that does not exist. +# PHONY targets skipped in both cases. +any-prereq =3D $(filter-out $(PHONY),$?)$(filter-out $(PHONY) $(wildcard $= ^),$^) + +# Execute command if command has changed or prerequisite(s) are updated. +if_changed =3D $(if $(any-prereq)$(cmd-check), = \ + $(cmd); = \ + printf '%s\n' 'cmd_$@ :=3D $(make-cmd)' > $(dot-target).cmd, @:) + +# Usage: $(call if_changed_rule,foo) +# Will check if $(cmd_foo) or any of the prerequisites changed, +# and if so will execute $(rule_foo). +if_changed_rule =3D $(if $(any-prereq)$(cmd-check),$(rule_$(1)),@:) + +cmd_and_record =3D = \ + $(cmd); = \ + printf '%s\n' 'cmd_$@ :=3D $(make-cmd)' > $(dot-target).cmd + +### +# why - tell why a target got built +# enabled by make V=3D2 +# Output (listed in the order they are checked): +# (1) - due to target is PHONY +# (2) - due to target missing +# (3) - due to: file1.h file2.h +# (4) - due to command line change +# (5) - due to missing .cmd file +# (6) - due to target not in $(targets) +# (1) PHONY targets are always build +# (2) No target, so we better build it +# (3) Prerequisite is newer than target +# (4) The command line stored in the file named dir/.target.cmd +# differed from actual command line. This happens when compiler +# options changes +# (5) No dir/.target.cmd file (used to store command line) +# (6) No dir/.target.cmd file and target not listed in $(targets) +# This is a good hint that there is a bug in the kbuild file +ifeq ($(KBUILD_VERBOSE),2) +why =3D = \ + $(if $(filter $@, $(PHONY)),- due to target is PHONY, = \ + $(if $(wildcard $@), = \ + $(if $(any-prereq),- due to: $(any-prereq), = \ + $(if $(cmd-check), = \ + $(if $(cmd_$@),- due to command line change, = \ + $(if $(filter $@, $(targets)), = \ + - due to missing .cmd file, = \ + - due to $(notdir $@) not in $$(targets) = \ + ) = \ + ) = \ + ) = \ + ), = \ + - due to target missing = \ + ) = \ + ) + +echo-why =3D $(call escsq, $(strip $(why))) +endif --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582717341; cv=none; d=zohomail.com; s=zohoarc; b=M6pzgJytU5sGn6v5QuLPad7te4SS/6aurT8w9E4Cm82nz9/E1mMpFR6VtiVGT/9SF0MR6IeQqQGzz0hQEjhwoFxr8PwjVCqviMRLshjAQEcl6o7hP6j5YQmeZOCcvHoSJCqZ/uvsEEn7Ibw3MA+zDBjPF0x8/fxlaeSm7+aONuA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717341; 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=9RwY458y6IbEPfeM19bqhkUSsbARAz3VzgCvHv7jAlE=; b=FTpscOOakYsqdKlyeUG3kKHKJcX7BA0HdVRq9NPcSOD/gITIx4y/8seFdHOFZZyaYsda71yhkoqLsJ+6odq9AkjdAFmWTpQ5bmZ1pWgiRDlMqK261ppt66xJEmdCWHmE2z4XkCz29nJGLaO1Gvtqx4XQwbl2U6d7zw0ICxfWAyg= 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 1582717341742535.8968757049298; Wed, 26 Feb 2020 03:42:21 -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 1j6v4J-0003LC-Kv; Wed, 26 Feb 2020 11:41:35 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6v4I-0003Iu-5K for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:34 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ec395eaa-588c-11ea-93ff-12813bfff9fa; Wed, 26 Feb 2020 11:41:27 +0000 (UTC) X-Inumbo-ID: ec395eaa-588c-11ea-93ff-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717288; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eMPSEKv85IuwoEEJda63d83PbGymtUCqa30QLn4UQSI=; b=bjg4oRpOoL64HRloHieWwdwfXmSN2VnHFnMhcGudmoS7icdv0FcOmiF9 TO3F8U+dnA2g7UyLfKOUfUm9hUZ8txmNdc04Al5d77APNFq2qJG5cm9mN AR9d106GKQ8nWh2q49mctFaL1GWWUG8IvBBPtGfRbv05ZV8gQSJ6RkU06 8=; Authentication-Results: esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: Yfp73634sRZgVSApPluOpnh2rMe/kgPMQjX1dW05Pf6K6IoB+b/xopjIR/qB7mOoUziXTOQ4YF FMGRyFX7RqpLRTVVHNBymUDvRzxWPUVlxHO79qw/OixCPwh1RIZRvkncsWyddQo6IFBctCkPTy bRpYpYFVtga75PVmaZuj1c0XyhZRijqj4sFizZtUb9aRo7LimgwSEvLIsBMiTr6dcct0lCaJn4 5orrpBHSUZk+9A/hbftH2ACfp7V9KHnUqk73UwCC+KWGdvo9UbfY+e4GVd96liN2te3Gz+dGcZ oko= X-SBRS: 2.7 X-MesageID: 13012990 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,487,1574139600"; d="scan'208";a="13012990" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:49 +0000 Message-ID: <20200226113355.2532224-18-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 17/23] xen/build: Start using if_changed 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) This patch start to use if_changed introduced in a previous commit. Whenever if_changed is called, the target must have FORCE as dependency so that if_changed can check if the command line to be run as changed, so the macro $(real-prereqs) must be use to discover the dependencies without "FORCE". Whenever a target isn't in obj-y, it should be added to extra-y so the .*.cmd dependency file associated with the target can be loaded. This is done for xsm/flask/ and both common/lib{elf,fdt}/ and arch/x86/Makefile. For the targets that generates .*.d dependency files, there's going to be two dependency files (.*.d and .*.cmd) until we can merge them together in a later patch via fixdep from Linux. One cleanup, libelf-relocate.o doesn't exist anymore. We import cmd_ld and cmd_objcopy from Linux v5.4. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Reviewed-by: Roger Pau Monn=C3=A9 --- xen/Rules.mk | 68 +++++++++++++++++++++++++++----------- xen/arch/arm/Makefile | 4 +-- xen/arch/x86/Makefile | 1 + xen/arch/x86/efi/Makefile | 7 ++-- xen/common/libelf/Makefile | 12 ++++--- xen/common/libfdt/Makefile | 9 +++-- xen/xsm/flask/Makefile | 17 +++++++--- 7 files changed, 84 insertions(+), 34 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 8807a2e21c94..bb4ced5f0dd4 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -52,6 +52,18 @@ SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16= , \ =20 include Makefile =20 +# Linking +# ------------------------------------------------------------------------= --- + +quiet_cmd_ld =3D LD $@ +cmd_ld =3D $(LD) $(XEN_LDFLAGS) -r -o $@ $(real-prereqs) + +# Objcopy +# ------------------------------------------------------------------------= --- + +quiet_cmd_objcopy =3D OBJCOPY $@ +cmd_objcopy =3D $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ + define gendep ifneq ($(1),$(subst /,:,$(1))) DEPS +=3D $(dir $(1)).$(notdir $(1)).d @@ -161,29 +173,47 @@ else $(CC) $(c_flags) -c $< -o $@ endif =20 -%.o: %.S Makefile - $(CC) $(a_flags) -c $< -o $@ +quiet_cmd_cc_o_S =3D CC $@ +cmd_cc_o_S =3D $(CC) $(a_flags) -c $< -o $@ + +%.o: %.S FORCE + $(call if_changed,cc_o_S) + + +quiet_cmd_obj_init_o =3D INIT_O $@ +define cmd_obj_init_o + $(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | while read idx nam= e sz rest; do \ + case "$$name" in \ + .*.local) ;; \ + .text|.text.*|.data|.data.*|.bss) \ + test $$sz !=3D 0 || continue; \ + echo "Error: size of $<:$$name is 0x$$sz" >&2; \ + exit $$(expr $$idx + 1);; \ + esac; \ + done; \ + $(OBJCOPY) $(foreach s,$(SPECIAL_DATA_SECTIONS),--rename-section .$(s)= =3D.init.$(s)) $< $@ +endef + +$(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.init.o: %.o FORCE + $(call if_changed,obj_init_o) + +quiet_cmd_cpp_i_c =3D CPP $@ +cmd_cpp_i_c =3D $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) $< -o $@ + +quiet_cmd_cc_s_c =3D CC $@ +cmd_cc_s_c =3D $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ =20 -$(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.init.o: %.o Makefile - $(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | while read idx name s= z rest; do \ - case "$$name" in \ - .*.local) ;; \ - .text|.text.*|.data|.data.*|.bss) \ - test $$sz !=3D 0 || continue; \ - echo "Error: size of $<:$$name is 0x$$sz" >&2; \ - exit $$(expr $$idx + 1);; \ - esac; \ - done - $(OBJCOPY) $(foreach s,$(SPECIAL_DATA_SECTIONS),--rename-section .$(s)=3D= .init.$(s)) $< $@ +quiet_cmd_s_S =3D CPP $@ +cmd_s_S =3D $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) $< -o $@ =20 -%.i: %.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) $< -o $@ +%.i: %.c FORCE + $(call if_changed,cpp_i_c) =20 -%.s: %.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ +%.s: %.c FORCE + $(call if_changed,cc_s_c) =20 -%.s: %.S Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) $< -o $@ +%.s: %.S FORCE + $(call if_changed,cpp_s_S) =20 # Add intermediate targets: # When building objects with specific suffix patterns, add intermediate diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 1599e2ba4058..37ca6d25c08e 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -98,8 +98,8 @@ prelink_lto.o: $(ALL_OBJS) prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o $(LD) $(XEN_LDFLAGS) -r -o $@ $^ else -prelink.o: $(ALL_OBJS) - $(LD) $(XEN_LDFLAGS) -r -o $@ $^ +prelink.o: $(ALL_OBJS) FORCE + $(call if_changed,ld) endif =20 $(TARGET)-syms: prelink.o xen.lds diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 5de873cf693e..6fb6cafdf47b 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -74,6 +74,7 @@ obj-$(CONFIG_TBOOT) +=3D tboot.o obj-y +=3D hpet.o obj-y +=3D vm_event.o obj-y +=3D xstate.o +extra-y +=3D asm-macros.i =20 x86_emulate.o: x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h =20 diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile index 490d791aae2d..3e4c395b7535 100644 --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -1,7 +1,10 @@ CFLAGS-y +=3D -fshort-wchar =20 -%.o: %.ihex - $(OBJCOPY) -I ihex -O binary $< $@ +quiet_cmd_objcopy_o_ihex =3D OBJCOPY $@ +cmd_objcopy_o_ihex =3D $(OBJCOPY) -I ihex -O binary $< $@ + +%.o: %.ihex FORCE + $(call if_changed,objcopy_o_ihex) =20 boot.init.o: buildid.o =20 diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile index 464c448d9d37..a92326c982e9 100644 --- a/xen/common/libelf/Makefile +++ b/xen/common/libelf/Makefile @@ -1,12 +1,16 @@ obj-bin-y :=3D libelf.o nocov-y +=3D libelf.o +libelf-objs :=3D libelf-tools.o libelf-loader.o libelf-dominfo.o =20 SECTIONS :=3D text data $(SPECIAL_DATA_SECTIONS) +OBJCOPYFLAGS :=3D $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$= (s)) =20 CFLAGS-y +=3D -Wno-pointer-sign =20 -libelf.o: libelf-temp.o Makefile - $(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$(s)) $= < $@ +libelf.o: libelf-temp.o FORCE + $(call if_changed,objcopy) =20 -libelf-temp.o: libelf-tools.o libelf-loader.o libelf-dominfo.o #libelf-rel= ocate.o - $(LD) $(XEN_LDFLAGS) -r -o $@ $^ +libelf-temp.o: $(libelf-objs) FORCE + $(call if_changed,ld) + +extra-y +=3D libelf-temp.o $(libelf-objs) diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile index e2a5e59380a0..3efa5c5f8ed3 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -1,14 +1,17 @@ include Makefile.libfdt =20 SECTIONS :=3D text data $(SPECIAL_DATA_SECTIONS) +OBJCOPYFLAGS :=3D $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$= (s)) =20 obj-y +=3D libfdt.o nocov-y +=3D libfdt.o =20 CFLAGS-y +=3D -I$(BASEDIR)/include/xen/libfdt/ =20 -libfdt.o: libfdt-temp.o Makefile - $(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$(s)) $= < $@ +libfdt.o: libfdt-temp.o FORCE + $(call if_changed,objcopy) =20 libfdt-temp.o: $(LIBFDT_OBJS) - $(LD) $(XEN_LDFLAGS) -r -o $@ $^ + $(call if_changed,ld) + +extra-y +=3D libfdt-temp.o $(LIBFDT_OBJS) diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 011ef5ca91f8..789e8fa1e3f9 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -20,12 +20,21 @@ AV_H_FILES =3D include/av_perm_to_string.h include/av_p= ermissions.h ALL_H_FILES =3D $(FLASK_H_FILES) $(AV_H_FILES) =20 $(obj-y) ss/built_in.o: $(ALL_H_FILES) +extra-y +=3D $(ALL_H_FILES) =20 -$(FLASK_H_FILES): $(FLASK_H_DEPEND) - $(CONFIG_SHELL) policy/mkflask.sh $(AWK) include $(FLASK_H_DEPEND) +mkflask :=3D policy/mkflask.sh +quiet_cmd_mkflash =3D MKFLASH $@ +cmd_mkflash =3D $(CONFIG_SHELL) $(mkflask) $(AWK) include $(real-prereqs) =20 -$(AV_H_FILES): $(AV_H_DEPEND) - $(CONFIG_SHELL) policy/mkaccess_vector.sh $(AWK) $(AV_H_DEPEND) +$(FLASK_H_FILES): $(FLASK_H_DEPEND) $(mkflash) FORCE + $(call if_changed,mkflash) + +mkaccess_vector :=3D policy/mkaccess_vector.sh +quiet_cmd_mkaccess_vector =3D MKACCESS VECTOR $@ +cmd_mkaccess_vector =3D $(CONFIG_SHELL) $(mkaccess_vector) $(AWK) $(real-p= rereqs) + +$(AV_H_FILES): $(AV_H_DEPEND) $(mkaccess_vector) FORCE + $(call if_changed,mkaccess_vector) =20 obj-bin-$(CONFIG_XSM_FLASK_POLICY) +=3D flask-policy.o flask-policy.o: policy.bin --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582717304; cv=none; d=zohomail.com; s=zohoarc; b=mWNlh8zLEHvl5GBw0YELuk6QvcabLNzIuSnUZrmD7c1NvuG1nMmhLUJYY6TTXVlgAGkJR7mQqSr47gFcnGdNGXlhkbLXwOx3DoVJKZLX7Z6ikkZSp/tFjzqw4GB6t5VnSfig1Tf7+0nTQ4aSi+1Ws6PnOHB0vKbI0n+I4d7Gni0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717304; 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=wn+ExbsZT3vUIiNtsw7INuwIFfsmPoe4unIAwmTw+vs=; b=AecRTs7WHXr3UA5Z2wIiEbXCYOTMALxnQn7dbvSaG5t+9SzUFYbY0FEF29abwJaND1orYo1+V2KXWghoKGfkKw2D8MZK15zjJ8C+nKRUhZpue5Xxf+qLSuFWHmVgEJ2QHjSJk9PaW6opiiONKFwlqY7huy/Q5IIJwQoH5cjTJW4= 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 1582717304325389.7195579263139; Wed, 26 Feb 2020 03:41:44 -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 1j6v3w-0002vg-Qs; Wed, 26 Feb 2020 11:41:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6v3v-0002vE-Rz for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:11 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e0dfc5f8-588c-11ea-a490-bc764e2007e4; Wed, 26 Feb 2020 11:41:08 +0000 (UTC) X-Inumbo-ID: e0dfc5f8-588c-11ea-a490-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717268; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JXH6Cl6SSxEurf/6KHmX8r5IFZsw3kS1kkJBHspz3UY=; b=gdedwo2YeoKiVND+KC3CzREvCDXbhctRvOxmqMArPAsnKKTjfF97+81Q LGy8oNJJRxWS9yKSsT2ea/hEIeFgQq7cX/snuV3+BlBUl9klPNkq/HEWF qBf7t//Ir+w2S+PHiyXdM9P89kFSviZJqw5yDkGB5ua5gzYfkcYAwP65h U=; 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: reAwUggB1XXFnLyc+HCbkRQQrxrfJgk0scWrwWrs8TIcdDK8W0t/8JbO8ayP6fiGRLdKLr7PYH hJHHr9Jf/hlL9EOO3K86aUMylKAWESUQozzFqGpmM5w5O28gLX0cfwjw5+uWxPKx6bWQnL1may xjkVEvvJFqCW9mUUrzbYCEIlQc0PeQ2Jwg5BluT4oztSrd9y6/YtOX+gmCXoevsyOh802oFMGB ytvj7qKh0rnr7h9V2SJPUl80DmWAds1Yl3G/6zIAuFsVcX5U4azOXVE02QeOimFNLmNjtrjuZl JIQ= X-SBRS: 2.7 X-MesageID: 13658310 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,487,1574139600"; d="scan'208";a="13658310" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:50 +0000 Message-ID: <20200226113355.2532224-19-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 18/23] xen/build: use if_changed on built_in.o 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) In the case where $(obj-y) is empty, we also replace $(c_flags) by $(XEN_CFLAGS) to avoid generating an .%.d dependency file. This avoid make trying to include %.h file in the ld command if $(obj-y) isn't empty anymore on a second run. Signed-off-by: Anthony PERARD --- xen/Rules.mk | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index bb4ced5f0dd4..cbf4feba0e0f 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -126,14 +126,21 @@ include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk c_flags +=3D $(CFLAGS-y) a_flags +=3D $(CFLAGS-y) $(AFLAGS-y) =20 -built_in.o: $(obj-y) $(extra-y) +quiet_cmd_ld_builtin =3D LD $@ +cmd_ld_builtin =3D \ + $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out $(extra-y),$(real-prereqs)) +quiet_cmd_cc_builtin =3D LD $@ +cmd_cc_builtin =3D \ + $(CC) $(XEN_CFLAGS) -c -x c /dev/null -o $@ + +built_in.o: $(obj-y) $(extra-y) FORCE ifeq ($(obj-y),) - $(CC) $(c_flags) -c -x c /dev/null -o $@ + $(call if_changed,cc_builtin) else ifeq ($(CONFIG_LTO),y) $(LD_LTO) -r -o $@ $(filter-out $(extra-y),$^) else - $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out $(extra-y),$^) + $(call if_changed,ld_builtin) endif endif =20 --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582717322; cv=none; d=zohomail.com; s=zohoarc; b=nutA677M8X8/5G0bsv4SOtWkQMOJlzscXz8FaC/HfC9B63WEOxg9KLn0iVaXUNAsbP3SsvZrjHHxUmWF4y/mrurmbmuhA7cAgsFQU5Hu12yZmBzVGY2g+apdiHYBIs4lvCis/ZrD8MJmSYEZ2X6HuEN6o57nTMH4xARgJ6jT+kY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717322; 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=/T4zzvtZ7Ra2xbqMa/612pX3iP5ZJsDVLSQhrgi8V+Q=; b=LfkJrP3wiUo36pN+U1xTvmU9FIC4j7XEVCiRNz3kNvdDkD3SJsrJsRW6PwW9mnJA8K+r/SY/bEqoEWqXrt6xL9mU2y1/kOsc/QbJmA3LLDn2ByqXthAf+FeXsHOdzG9nA9X0sK0x0n8yY733Tfxmz08iKHy6/YzHL/CUxq4H5d4= 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 158271732299439.44063975797894; Wed, 26 Feb 2020 03:42:02 -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 1j6v4E-0003Dw-Kq; Wed, 26 Feb 2020 11:41:30 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6v4D-0003CD-5V for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:29 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e838d77c-588c-11ea-93ff-12813bfff9fa; Wed, 26 Feb 2020 11:41:20 +0000 (UTC) X-Inumbo-ID: e838d77c-588c-11ea-93ff-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717280; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=L5VAIkTm4RVu7vvlOd7YT+u3y95320w9ahzrwbDBRls=; b=Z7XR9xC9SI/YqOwsow1GlT0xiaFVngZAGUbi8mxEqWny2dFi/7yIDS4u VXfUUZr9saLG4iq6HbvBD3K1hSm172irgp1W3QDF09wqL3a+WQyoA05Id xuXGyO3VB1QHJx8u2QHX0O15a5bEifGPwdSdK7WhUM555giCgl3VOUR5v Y=; 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: DID107mk41IC12RgYoANWwePVEMeVkQ9VF+iVg7R4ytt3uJQmbGZxvjITJ04yBX6yV0ROtKH25 4CX9JczeUqrinOLL9bxuoW+PrpGNihD+RFmJgT06b8naZVS6sSdzXz0+A88IAobzyWVVsCdoz4 Aotd3XCpvOYyTfxnZ1l1OLWeEzusHxhCeJ3BOy1b2oQtRpSXrVBxYjK0NDRcbWQ3Q7+ITKuZ2m 7RaL+Qn84as6mr6C/E/1H6PhTUBJxeITk1XhC3wnQMDvTsDzTJhDjhY/4umanTuYm8Mx6o23dJ 2Mk= X-SBRS: 2.7 X-MesageID: 13658316 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,487,1574139600"; d="scan'208";a="13658316" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:51 +0000 Message-ID: <20200226113355.2532224-20-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 19/23] xen/build: Use if_changed_rules with %.o:%.c 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 , 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) Use $(dot-target) to have the target name prefix with a dot. Now, when the CC command has run, it is recorded in .*.cmd file, then if_changed_rules will compare it on subsequent runs. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Rules.mk | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index cbf4feba0e0f..8c7dba9211d1 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -167,19 +167,27 @@ FORCE: =20 SRCPATH :=3D $(patsubst $(BASEDIR)/%,%,$(CURDIR)) =20 -%.o: %.c Makefile +quiet_cmd_cc_o_c =3D CC $@ ifeq ($(CONFIG_ENFORCE_UNIQUE_SYMBOLS),y) - $(CC) $(c_flags) -c $< -o $(@D)/.$(@F).tmp -MQ $@ -ifeq ($(CONFIG_CC_IS_CLANG),y) - $(OBJCOPY) --redefine-sym $<=3D$(SRCPATH)/$< $(@D)/.$(@F).tmp $@ -else - $(OBJCOPY) --redefine-sym $( (p=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 1582717302279854.7949098656785; Wed, 26 Feb 2020 03:41:42 -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 1j6v3q-0002rs-Nq; Wed, 26 Feb 2020 11:41:06 +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 1j6v3p-0002rk-PJ for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:05 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id dec9d466-588c-11ea-93ff-12813bfff9fa; Wed, 26 Feb 2020 11:41:04 +0000 (UTC) X-Inumbo-ID: dec9d466-588c-11ea-93ff-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717264; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nrEK9P6/8xswePeoj0IWg66RRPf92+1H6bnWQ10Bt1E=; b=YKFtydLVgs8CHKN2HsDSUuBFHNwwAD6qtB1wh8y9p/SPgbp4377eoOZD ivYvWJmPM9yfCBdvQPUsLS3PR0eximbq9KoUzkusMRqhaB8alYboYB9dS hOwEXdIDnGhA2u0fzQVXzRq1OlLLNj0wX4D44+msjN9WwdUPTQQ3VKVc5 8=; 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: pBEDIBz/kwclyxMwwIbkB4SPUejcjmGWqaFp4cGTY1kNlfqtVoYTuCWu4dpSRsULmf28R/y0GA d7SMNiMWd09pPwXn7gSWf2IXoq9ue7pgU09xB6slPLJicXTp8ZrSlZpleY/uT54GyNO2lDgZmo iok1swtRZtxd9zljEYc56l044Jx1sy4QE9kLStnHIn2Kk8v2d378237sOrs7ULnSpfY/Cidvnt xF4zeypg8bfEzFP/opzclEWNIQvkzoJhAfZBS1rYSjT8dWoPRYjm2w091H2PJoOuNchzhMntlr fdc= X-SBRS: 2.7 X-MesageID: 13462008 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,487,1574139600"; d="scan'208";a="13462008" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:52 +0000 Message-ID: <20200226113355.2532224-21-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 20/23] xen/build: factorise generation of the linker scripts 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) In Arm and X86 makefile, generating the linker script is the same, so we can simply have both call the same macro. We need to add *.lds files into extra-y so that Rules.mk can find the .*.cmd dependency file and load it. Signed-off-by: Anthony PERARD --- xen/Rules.mk | 8 ++++++++ xen/arch/arm/Makefile | 5 ++--- xen/arch/x86/Makefile | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 8c7dba9211d1..02cd37d04054 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -230,6 +230,14 @@ cmd_s_S =3D $(CPP) $(filter-out -Wa$(comma)%,$(a_flags= )) $< -o $@ %.s: %.S FORCE $(call if_changed,cpp_s_S) =20 +# Linker scripts, .lds.S -> .lds +quiet_cmd_cc_lds_S =3D LDS $@ +define cmd_cc_lds_S + $(CC) -P -E -Ui386 $(filter-out -Wa$(comma)%,$(a_flags)) -o $@ $<; \ + sed -e 's/.*\.lds\.o:/$(@F):/g' <$(dot-target).d >$(dot-target).d.new;= \ + mv -f $(dot-target).d.new $(dot-target).d +endef + # Add intermediate targets: # When building objects with specific suffix patterns, add intermediate # targets that the final targets are derived from. diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 37ca6d25c08e..b3ee4adb9ac4 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -124,9 +124,8 @@ asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(CC) $(filter-out -flto,$(c_flags)) -S -o $@ $< =20 xen.lds: xen.lds.S - $(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 + $(call if_changed,cc_lds_S) +extra-y +=3D xen.lds =20 dtb.o: $(CONFIG_DTB_FILE) =20 diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 6fb6cafdf47b..1be94846e11f 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -75,6 +75,7 @@ obj-y +=3D hpet.o obj-y +=3D vm_event.o obj-y +=3D xstate.o extra-y +=3D asm-macros.i +extra-y +=3D xen.lds =20 x86_emulate.o: x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h =20 @@ -197,6 +198,7 @@ endif note_file_option ?=3D $(note_file) =20 ifeq ($(XEN_BUILD_PE),y) +extra-y +=3D efi.lds $(TARGET).efi: prelink-efi.o $(note_file) efi.lds efi/relocs-dummy.o efi/m= kreloc $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< efi/relocs-d= ummy.o \ @@ -244,9 +246,7 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i M= akefile =20 efi.lds: AFLAGS-y +=3D -DEFI xen.lds efi.lds: xen.lds.S - $(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 + $(call if_changed,cc_lds_S) =20 boot/mkelf32: boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582717330; cv=none; d=zohomail.com; s=zohoarc; b=LeUP/RE9Uk40kOaeuQddzaUYCokmxiLnbftQGSadjgxukSNBeM4gcLF6g8SI8cHPUvkqauEAv8MR4rjri5wfLJRHkDNqNRqpObOLgf8lFXqc14r1cFUzCRYb3D2lXOgySOyvIP4v4A2FR9o41uLBacZo+EFMJLUdbvbgFY/72dc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717330; 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=PqcbhAjglUPjXKOhHn6r9pyfuNslabmRZn4FtgQGyUs=; b=gHmRElItSJ9tpKDsLQ84I6XBOyJapd4M4CN8qcYl/zmIitTKAcZqO1YswvPJQgLdKWZCGW+fs5kT7/Eg4JFPf2UbyBlzar6pm421gTNAO32JQa+nvR5BLjwSlrrBhE3faY7iRcmejKU+8BpHEQ9KdzJ335B4CQyJtxh8P3KxRXA= 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 1582717330072156.93261642946186; Wed, 26 Feb 2020 03:42:10 -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 1j6v4H-0003Gt-1T; Wed, 26 Feb 2020 11:41:33 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6v4F-0003FY-Sg for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:31 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ec8bb9a2-588c-11ea-a490-bc764e2007e4; Wed, 26 Feb 2020 11:41:28 +0000 (UTC) X-Inumbo-ID: ec8bb9a2-588c-11ea-a490-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717287; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=odP+2+4s5ItcxBpgk9Rcfi1qr590Uq9ubJZSXq4LO5Y=; b=h3eCppYN0UgpnebcHzoeRh2kRokpcaXrPrfokP+NFO4jGOu5qtJo4a8S oTgbySILr7sILw6CaKb7PyXdD+4v3Paw2wMyX7x3rh2Mb14q8CRmgW95E rsIMwGYf67RixWWkbhn0j66Mo8hJQe5lJnMnV8N8qwz5D7t9vuklR3vKV k=; 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: tXCyrG59cVrZXeL/nWxJqmn1FP0hWqAAlnI/09+yA/V+Y3Mficu16aLZawdJJe0D5DBsp2n8g4 ktX8btYMjKg8OzqC98lmKxOqZsF65q6dHWzgHjnSt+DDMHUNJbDLKkmkVw5fIQu2Aq6+G5Qkcy f7Bp4VXY/70KHUiIC65eAxzK4ceb9pEyNOSd5RdletWW5XGoYFhMRu3qg/trkEs8wOG0Qqwqhn SFbu0tcegg0P+rZPYs2Ee5f+LypPnFEO0fYaW1e6nEIl2hBAgFT01r9kgEg5LLGY3yP1+CJ5/b A4Q= X-SBRS: 2.7 X-MesageID: 13462023 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,487,1574139600"; d="scan'208";a="13462023" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:53 +0000 Message-ID: <20200226113355.2532224-22-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 21/23] xen/build: Use if_changed for prelink*.o 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 , Jan Beulich , =?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 change the dependencies of prelink-efi.o so that we can use the same command line. The dependency on efi/built_in.o isn't needed because, we already have: efi/*.o: efi/built_in.o to build efi/*.o files that prelink-efi.o needs. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Reviewed-by: Roger Pau Monn=C3=A9 --- xen/arch/x86/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 1be94846e11f..55c6ae8ce0d2 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -131,11 +131,11 @@ prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$= (ALL_OBJS)) prelink_lto.o prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) preli= nk-efi_lto.o efi/boot.init.o $(LD) $(XEN_LDFLAGS) -r -o $@ $^ else -prelink.o: $(ALL_OBJS) - $(LD) $(XEN_LDFLAGS) -r -o $@ $^ +prelink.o: $(ALL_OBJS) FORCE + $(call if_changed,ld) =20 -prelink-efi.o: $(ALL_OBJS) efi/boot.init.o efi/runtime.o efi/compat.o - $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^) +prelink-efi.o: $(filter-out %/efi/built_in.o,$(ALL_OBJS)) efi/boot.init.o = efi/runtime.o efi/compat.o FORCE + $(call if_changed,ld) endif =20 $(TARGET)-syms: prelink.o xen.lds --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582717300; cv=none; d=zohomail.com; s=zohoarc; b=LsfyDNRw8A8eJ7NBzSMBUXzQiIhzyzuY8XjAellwWfWldeLyP/rZflh0XIg1rWnxwXl9CPkaFK3bzw0sA9f18YT16wCBMoBpFWqhyMRRScbrkwAMAmrnDMvSiyJsNrM4U3E6/AKMN0qRyFmeX7sB21JNlFy0zc8FipXmGZQj4GU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717300; 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=MbEC3n9oc9cYWp5uvUNIEaWxyUzD6nHGYu7jOrTYN9s=; b=jV81veDKP54EuTwlOg1jKSVV/xYE9U5Rb9w/WchTojepNoLZM6ux/0l58zb+PxI86A63xZsbHsp/lx+ls7YuogI9Lm1pmVsWJAE6E7mT3hEDxih7jv37el0AzKu4Egx5ieAMmiPSf3RmPwbnCnkg508VZzkccP1e1ZMV1ae303c= 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 1582717300885830.8232222754243; Wed, 26 Feb 2020 03:41:40 -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 1j6v3s-0002sc-2Q; Wed, 26 Feb 2020 11:41: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 1j6v3q-0002rx-Qo for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:06 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id df8c658a-588c-11ea-a490-bc764e2007e4; Wed, 26 Feb 2020 11:41:06 +0000 (UTC) X-Inumbo-ID: df8c658a-588c-11ea-a490-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717267; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CgqtPNdj3Dl7hyOtfntE04Kdu5PkFy1yAtmPoJq5ApA=; b=XYBhg+R8BxMwWQ4qc+ihGsvEWe0dg1uPi6ytxiVgCHgiaTuDAXsXkKAj jeTSB9Eg5ohy6cmKSenvnz+O02laIPGlAEr24bCzavAOEl6QgsEqJImre MokfXjhvsgiTjugGbzMVSpCzDdHEvgC+cTa4PnZJ0WNlwP/cCl3Yt51i0 k=; Authentication-Results: esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.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=esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: AetCv0TGQ5Zx2JsD6BVOR0tcUMLdZuaz0pl+3ajTcyztKcpWKMQl9qazH3ftVWIre0q3goZc7M bj+XQ2+d4GNyf2SgqOADpk3mk9r0nR3X3EdR7zc5QNsrFmTEBkO7FR2Qy5uOdazmSIQ4TLjfSd Sc065fln3YhWje7rls726pTd3H29lV2NVB3bDhlZIgWf84KIm5eZ9gfbc0Dp3ND85qpDBLmi5b ksFLGyc8jiXvh7PY8o8aYI4mP0r1bLMdBwSwHsTXbcQzGppCdXAHWjS+TvNykvA7p6Wfh36zLP MlQ= X-SBRS: 2.7 X-MesageID: 13211249 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,487,1574139600"; d="scan'208";a="13211249" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:54 +0000 Message-ID: <20200226113355.2532224-23-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 22/23] xen, symbols: rework file symbols selection 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) Rework symbols so it prefer file symbols that names an object file to file symbols that have a directory component. But have symbols still prefer the first file symbol if one of the above is true, or prefer the second file symbols if it names a source file without directory component. In a future patch, we are going want to run $(CC) from the root directory (xen.git/xen that is). So the guest_walk_%.o files are going to have two file symbols, one with a directory component and another one which name an object file. We still want to prefer the file symbols that names an object file, no mater if it is first or second. And before running everything from the root directory, we will be able to use the same runes to build the guest_%.o as to build any other %.o files from %.c files (the rule with the objcopy --redefine-sym). Signed-off-by: Anthony PERARD --- xen/tools/symbols.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c index 9f9e2c990061..b7a00b4be487 100644 --- a/xen/tools/symbols.c +++ b/xen/tools/symbols.c @@ -80,11 +80,17 @@ static inline int is_arm_mapping_symbol(const char *str) && (str[2] =3D=3D '\0' || str[2] =3D=3D '.'); } =20 +enum symbol_type { + symbol =3D 0, + single_source =3D 1, + dir_source =3D 2, + obj_source =3D 3, +}; static int read_symbol(FILE *in, struct sym_entry *s) { char str[500], type[20] =3D ""; char *sym, stype; - static enum { symbol, single_source, multi_source } last; + static enum symbol_type last; static char *filename; int rc =3D -1; =20 @@ -125,13 +131,19 @@ static int read_symbol(FILE *in, struct sym_entry *s) * prefer the first one if that names an object file or has a * directory component (to cover multiply compiled files). */ - bool multi =3D strchr(str, '/') || (sym && sym[1] =3D=3D 'o'); - - if (multi || last !=3D multi_source) { + enum symbol_type current; + if (sym && sym[1] =3D=3D 'o') + current =3D obj_source; + else if (strchr(str, '/')) + current =3D dir_source; + else + current =3D single_source; + + if (current > last || last =3D=3D single_source) { free(filename); filename =3D *str ? strdup(str) : NULL; + last =3D current; } - last =3D multi ? multi_source : single_source; goto skip_tail; } =20 --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon Apr 29 05:18:05 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=1582717319; cv=none; d=zohomail.com; s=zohoarc; b=nzXm1w3n4WUALQJzB+QS+7r+dqsbg4RFwaUyqFFp3je0N4ZkAS2YcLihU06aMnZn6btAzwvt4KDM6rddsJhIwdyW6cRjmTeSk03nS9iH5zHip3qeKvhs1U9KosMvmKxjfyNFRq1AYCzy1y8nNFjDh5lPb7TtYKO3Y9ur//LTD90= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582717319; 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=SqU0PPCpiGKmvpQxZtIeis8gDyYAI+yi2hhZHjO23gw=; b=SFAj4loZ2hJIqKzrDTVUfb7VqXOCvHEtOwLqdvnkUYCCM1dMFaPF1lFhOq6EWgaKAl/Y8JDNs/AcM65xff/hS8t2rfrW2+hDnAcSCS3XqGmwj58HMbL3DLmabumwSPYeHzSZNEqIh7cbwBDpoO7qO0dDk1WQ6tZ3lh8mFGwjYUQ= 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 158271731923131.606705535949004; Wed, 26 Feb 2020 03:41: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 1j6v4C-0003Ax-8P; Wed, 26 Feb 2020 11:41:28 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j6v4A-00039k-Ro for xen-devel@lists.xenproject.org; Wed, 26 Feb 2020 11:41:26 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e7acb5a8-588c-11ea-8cb6-bc764e2007e4; Wed, 26 Feb 2020 11:41:19 +0000 (UTC) X-Inumbo-ID: e7acb5a8-588c-11ea-8cb6-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1582717280; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xHJSK+ksoK9OQta1FpeZ8S5l79r9MroWvjBMZmZjrxo=; b=KAOr+pRP5ZjjbLZw1LfajUoTcM/FRH1e8gt7s+LA8eioZ4oZyVvOSnrb hTtolwKoQx07oEzRZ1q4Lp1hpNgnSccq0weRvjsEo8MTKaMnZnqyD04eA MC6Ftho4ZAuo1j/YncefY4CNiTuOO9GxXuElbLFgCKpBtFlrE2wIOPbu9 w=; 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: SipcPua4BGfp/QVTy+Gw23/L45n9qgjdXiXQffCmOYfg7FsVehvwbKR9Rp4N3iywBY3HmIdQ0D ymQ0g6oNtUh84EUKn9YZn1z65u2dyUWyCoPT3EXs0R53NX49Xf+vcMHEpN7o5josbihzHVsA4U DUSeIcBHURPiH81cOmLTgS46aq8oskmmrX659KxDc07ysoS4jT+FIaU83nNWCOLMtp7O7KEaDO oyMBtBOj99/NjxTmlzqZW7sywgt5toLkFpG9oME3lzUcbUtpbLBuQFKfftAHE9G1WY7VCSrJlD wb8= X-SBRS: 2.7 X-MesageID: 13038476 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,487,1574139600"; d="scan'208";a="13038476" From: Anthony PERARD To: Date: Wed, 26 Feb 2020 11:33:55 +0000 Message-ID: <20200226113355.2532224-24-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200226113355.2532224-1-anthony.perard@citrix.com> References: <20200226113355.2532224-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 23/23] xen/build: use if_changed to build guest_%.o 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 , Jan Beulich , 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) Use if_changed for building all guest_%.o objects, and make use of command that already exist. This patch also introduces CFLAGS_$@, it is used so that flags are applied to all .o .i and .s targets. This patch make a change to the way guest_%.o files are built, and now run the same commands that enforce unique symbols. But with patch "xen,symbols: rework file symbols selection", symbols should still select the file symbols directive intended to be used for guest_%.o objects. Signed-off-by: Anthony PERARD --- xen/Rules.mk | 5 ++++- xen/arch/x86/mm/Makefile | 15 +++++++++------ xen/arch/x86/mm/hap/Makefile | 15 +++++++++------ xen/arch/x86/mm/shadow/Makefile | 15 +++++++++------ 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 02cd37d04054..1ffb02f42914 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -115,6 +115,9 @@ endif # 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 $@) + # Calculation of flags, first the generic flags, then the arch specific fl= ags, # and last the flags modified for a target or a directory. =20 @@ -123,7 +126,7 @@ a_flags =3D -MMD -MF $(@D)/.$(@F).d $(XEN_AFLAGS) =20 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk =20 -c_flags +=3D $(CFLAGS-y) +c_flags +=3D $(CFLAGS-y) $(CFLAGS_$(target-stem).o) a_flags +=3D $(CFLAGS-y) $(AFLAGS-y) =20 quiet_cmd_ld_builtin =3D LD $@ diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index a2431fde6bb4..4750bfa0ff91 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -11,11 +11,14 @@ obj-y +=3D p2m.o p2m-pt.o obj-$(CONFIG_HVM) +=3D p2m-ept.o p2m-pod.o obj-y +=3D paging.o =20 -guest_walk_%.o: guest_walk.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ +$(foreach gw,$(filter guest_walk_%.o,$(obj-y)),\ + $(eval CFLAGS_$(gw) =3D -DGUEST_PAGING_LEVELS=3D$$*)) =20 -guest_walk_%.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ +guest_walk_%.o: guest_walk.c FORCE + $(call if_changed_rule,cc_o_c) =20 -guest_walk_%.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ +guest_walk_%.i: guest_walk.c FORCE + $(call if_changed,cpp_i_c) + +guest_walk_%.s: guest_walk.c FORCE + $(call if_changed,cc_s_c) diff --git a/xen/arch/x86/mm/hap/Makefile b/xen/arch/x86/mm/hap/Makefile index 22e7ad54bd33..8cd31e9cdc5e 100644 --- a/xen/arch/x86/mm/hap/Makefile +++ b/xen/arch/x86/mm/hap/Makefile @@ -5,11 +5,14 @@ obj-y +=3D guest_walk_4level.o obj-y +=3D nested_hap.o obj-y +=3D nested_ept.o =20 -guest_walk_%level.o: guest_walk.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ +$(foreach gw,$(filter guest_walk_%level.o,$(obj-y)),\ + $(eval CFLAGS_$(gw) =3D -DGUEST_PAGING_LEVELS=3D$$*)) =20 -guest_walk_%level.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ +guest_walk_%level.o: guest_walk.c FORCE + $(call if_changed_rule,cc_o_c) =20 -guest_walk_%level.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ +guest_walk_%level.i: guest_walk.c FORCE + $(call if_changed,cpp_i_c) + +guest_walk_%level.s: guest_walk.c FORCE + $(call if_changed,cc_s_c) diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makef= ile index 23d3ff10802c..d11e9e2fac08 100644 --- a/xen/arch/x86/mm/shadow/Makefile +++ b/xen/arch/x86/mm/shadow/Makefile @@ -6,11 +6,14 @@ else obj-y +=3D none.o endif =20 -guest_%.o: multi.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ +$(foreach gw,$(filter guest_%.o,$(obj-y)),\ + $(eval CFLAGS_$(gw) =3D -DGUEST_PAGING_LEVELS=3D$$*)) =20 -guest_%.i: multi.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ +guest_%.o: multi.c FORCE + $(call if_changed_rule,cc_o_c) =20 -guest_%.s: multi.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ +guest_%.i: multi.c FORCE + $(call if_changed,cpp_i_c) + +guest_%.s: multi.c FORCE + $(call if_changed,cc_s_c) --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel