From nobody Tue Feb 10 04:03:25 2026 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=1579107675; cv=none; d=zohomail.com; s=zohoarc; b=PiJ0dP6Pb/0UJyjIp+Ayyodz6f2AgYg1UNUEqZ+cVeoCd6K8xwDjz67i4zHUdz0gFfHFd2gXY0NDgih5FjWvkihHDkXOcwNtIBErlwZuZCKBwKeiNlOcm+OCDjADPT9Rq26uRDwaqYljWWBeACPF+JKotZsAiVebZ6G+YjHhYLQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579107675; 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=Af6+r0UNi87V9JMLnrcJhcaaZg4jEVYco8bpyiBjvvU=; b=CKOoOGGvaLb6SVaGhhE7ETkVvYg8F1oFMUG8VLAsZAOEdDz/+V6xTWMr7X8RQltihWBPwiC6fl9VFEzL9V4b+dEXlYgJ/3lPMhXkI68Tk6w06/7nGIxE3YTQJq1RglsgbtN4Vq9oW3zsEiHwD+ub6ztnPy34jxxcda3mRKzUSCg= 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 1579107675437958.500277723159; Wed, 15 Jan 2020 09:01:15 -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 1irm1w-0008H0-JC; Wed, 15 Jan 2020 17:00:32 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1irm1v-0008Gq-07 for xen-devel@lists.xenproject.org; Wed, 15 Jan 2020 17:00:31 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 83d5a0ca-37b8-11ea-ac27-bc764e2007e4; Wed, 15 Jan 2020 17:00:22 +0000 (UTC) X-Inumbo-ID: 83d5a0ca-37b8-11ea-ac27-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579107622; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7XxPk4DO2eSwzHsmnEYEkv5cmAkOZVzyc+zyg72XuUo=; b=HTydct1v1Tbt7/wD99T+ec5ovStpTHTixOQJXR7vwJpSqhNK/rAiqG0W dyZ/YstgBXtCSKPigbK+miAlWbD3QtSt7SyE4ogdTWnsscaCVCaohxFAh WQWjxjxoXsdzFzjWCH4/2IstCGFV7z+eghfqKPlOzYFW6LIubYHN3TLrK E=; 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: CeX3I2RzuC4yWwQu1gzfQuGWDhrlssPQSOoDHYGZqeFvhgaxf6ZLfzYhI5aJOSLIb/YlLtrD6q 4LCUH+w+Q8stmyav05361XNIuMIdeCTRtIgl2y6+mNOhAm7O+AI8gJsQhc5H3fxMUf6O5S5+A+ wlA0UXIFHS7CXieBtATp2cJdKh+THJgpAJjvaIEQmP4XsgH3Wuvpw8ROByKcfWjk+Gr90P3n1r rimoxJbHdqIZ5yVjNG6eBRV6RwL2aoBcV8Tx5s2JJSdkhMF50lCAUpm2sMQJUgsaOLYH8M9R+B U3Q= X-SBRS: 2.7 X-MesageID: 10973256 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,323,1574139600"; d="scan'208";a="10973256" From: Anthony PERARD To: Date: Wed, 15 Jan 2020 17:00:12 +0000 Message-ID: <20200115170015.249667-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200115170015.249667-1-anthony.perard@citrix.com> References: <20200115170015.249667-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v3 3/6] xen: Import cc-ifversion from Kbuild 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) This is in preparation of importing Kbuild to build Xen. We won't be able to include Config.mk so we will need a replacement for the macro `cc-ifversion'. This patch imports parts of "scripts/Kbuild.include" from Linux v5.4, the macro cc-ifversion. It makes use of CONFIG_GCC_VERSION that Kconfig now provides. Since they are no other use of Xen's `cc-ifversion' macro, we can remove it. Signed-off-by: Anthony PERARD Acked-by: Andrew Cooper --- Config.mk | 5 ----- xen/Rules.mk | 1 + xen/common/coverage/Makefile | 8 ++++---- xen/scripts/Kbuild.include | 7 +++++++ 4 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 xen/scripts/Kbuild.include diff --git a/Config.mk b/Config.mk index 35d66e5e121a..65649d6122d1 100644 --- a/Config.mk +++ b/Config.mk @@ -121,11 +121,6 @@ define cc-ver-check-closure endif endef =20 -# cc-ifversion: Check compiler version and take branch accordingly -# Usage $(call cc-ifversion,lt,0x040700,string_if_y,string_if_n) -cc-ifversion =3D $(shell [ $(call cc-ver,$(CC),$(1),$(2)) =3D "y" ] \ - && echo $(3) || echo $(4)) - # Require GCC v4.1+ check-$(gcc) =3D $(call cc-ver-check,CC,0x040100,"Xen requires at least gc= c-4.1") $(eval $(check-y)) diff --git a/xen/Rules.mk b/xen/Rules.mk index 5aba841b0a95..d053dbd26526 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -2,6 +2,7 @@ -include $(BASEDIR)/include/config/auto.conf =20 include $(XEN_ROOT)/Config.mk +include $(BASEDIR)/scripts/Kbuild.include =20 =20 ifneq ($(origin crash_debug),undefined) diff --git a/xen/common/coverage/Makefile b/xen/common/coverage/Makefile index 46c78d1086d6..b509e51f960b 100644 --- a/xen/common/coverage/Makefile +++ b/xen/common/coverage/Makefile @@ -1,10 +1,10 @@ obj-y +=3D coverage.o ifneq ($(clang),y) obj-y +=3D gcov_base.o gcov.o -obj-y +=3D $(call cc-ifversion,lt,0x040700, \ - gcc_3_4.o, $(call cc-ifversion,lt,0x040900, \ - gcc_4_7.o, $(call cc-ifversion,lt,0x050000, \ - gcc_4_9.o, $(call cc-ifversion,lt,0x070000, \ +obj-y +=3D $(call cc-ifversion,-lt,0407, \ + gcc_3_4.o, $(call cc-ifversion,-lt,0409, \ + gcc_4_7.o, $(call cc-ifversion,-lt,0500, \ + gcc_4_9.o, $(call cc-ifversion,-lt,0700, \ gcc_5.o, gcc_7.o)))) else obj-y +=3D llvm.o diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include new file mode 100644 index 000000000000..a5c462fd9777 --- /dev/null +++ b/xen/scripts/Kbuild.include @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0 +#### +# kbuild: Generic definitions + +# 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