From nobody Mon Feb 9 10:12:14 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=1576580400; cv=none; d=zohomail.com; s=zohoarc; b=SMeUaur0uw82h4xskZGMXnmbuVsJAtQ6ORv7zexNk7Hyx0RlaPeDFYB1k2eY7DwnJMLx8kwgPRRPW4EiTkPaYi6oaA9onFCsZR0jLdRztO1cfUNCt1l07hP3pBprSmM1xQE0IkRwI52TFft1jif9BDXwKZwN8tAbvvb/GBxmcC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576580400; 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=SndZCwwqUkdUB6/R57yCC52v9VSSTBh6OGsPzOVQA++qZwaCYqcFvgvGKYA4hSdRW0uMkPR/HIQH6NX2PmSixsI8sHLJsKJyr2b16sbaygXeA9oEluLGMGN4dkkAq92uQ51Md5wkA680IeYCY6GGiU/fs6PhqXVH4ZQlcch/4Ik= 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 1576580400100299.04214349449035; Tue, 17 Dec 2019 03:00: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 1ihAZO-00087N-BK; Tue, 17 Dec 2019 10:59:14 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ihAZM-00087F-BP for xen-devel@lists.xenproject.org; Tue, 17 Dec 2019 10:59:12 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3f188488-20bc-11ea-8e9d-12813bfff9fa; Tue, 17 Dec 2019 10:59:07 +0000 (UTC) X-Inumbo-ID: 3f188488-20bc-11ea-8e9d-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1576580347; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7XxPk4DO2eSwzHsmnEYEkv5cmAkOZVzyc+zyg72XuUo=; b=RXD6w0PcVXbWa7S5KVrw0Dt7AnE6KdTF3aWCX17mcXW7FJg181tG8TER LedAtX4tZnEdBbb6E4+Zc6zSLE1+CvT3QwrIrw++pNbvAsVPykBJKyjzM BqR/dfPFnkLQlqowwsxTw2Vw/qFqeX3jaJt7nj6gjNWvTvqin5c8L0YFR g=; 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: zN8uTkGzg8jeJGR8tKD3P+mip2OSNLoBQLGUDtnMpFoQn24wET5Bf/Ko1pCj47SBbrDxowBAyo cb3aC7b7lcdviL9gGJ615HCwGhIRcQyxmOaqYCFMGbJYrAg1JvbB6vXPYps0WtwFM2Bnku2yoO 1F/4rr4zL8JoSEa/55MY09r6RrrrfXq/pRsFnD7BDSDI9ws0sIopQse9JUoL3HkJHImeCL+LIp N1vsQzQlBmHt8yQ7E5/UFQOFqtgwHvakfd3xaOuMyaNBOSHyH1rkx5C5AyfV5gjASOK30Z+P/B A8E= X-SBRS: 2.7 X-MesageID: 10211656 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.69,325,1571716800"; d="scan'208";a="10211656" From: Anthony PERARD To: Date: Tue, 17 Dec 2019 10:58:58 +0000 Message-ID: <20191217105901.68158-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191217105901.68158-1-anthony.perard@citrix.com> References: <20191217105901.68158-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH v2 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