From nobody Mon Feb 9 14:02:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1770634031326923.3728819924748; Mon, 9 Feb 2026 02:47:11 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1225215.1531698 (Exim 4.92) (envelope-from ) id 1vpOn9-0008GW-8E; Mon, 09 Feb 2026 10:46:55 +0000 Received: by outflank-mailman (output) from mailman id 1225215.1531698; Mon, 09 Feb 2026 10:46:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vpOn9-0008GP-4W; Mon, 09 Feb 2026 10:46:55 +0000 Received: by outflank-mailman (input) for mailman id 1225215; Mon, 09 Feb 2026 10:46:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vpOn8-0008GA-9V for xen-devel@lists.xenproject.org; Mon, 09 Feb 2026 10:46:54 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id a414413b-05a4-11f1-b162-2bf370ae4941; Mon, 09 Feb 2026 11:46:51 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 46E7D339; Mon, 9 Feb 2026 02:46:44 -0800 (PST) Received: from C3HXLD123V.arm.com (unknown [10.57.53.56]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DA2123F63F; Mon, 9 Feb 2026 02:46:48 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a414413b-05a4-11f1-b162-2bf370ae4941 From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH v5] xen: Add Darwin.mk Date: Mon, 9 Feb 2026 11:46:44 +0100 Message-ID: <49c0bd388d45b6936bd852d99fbbc262fb078253.1770633598.git.bertrand.marquis@arm.com> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1770634033355154100 Content-Type: text/plain; charset="utf-8" Xen does not provide a Darwin build configuration useable on Mac OS. It is possible to build Xen Hypervisor (tools are not supported) with a toolchain able to produce ELF binaries (GCC or others). Add config/Darwin.mk to include StdGNU.mk and force XEN_COMPILE_ARCH=3Dunknown, ensuring Darwin builds always follow the cross-compile path so compiling on Mac OS is always handled as a cross compilation case. Only compiling the hypervisor has been tested ! An example of how to build the hypervisor for arm64 on Mac OS (tools cannot be build for now) using a compiler from brew: - brew install aarch64-elf-gcc aarch64-elf-binutils - make XEN_TARGET_ARCH=3Darm64 CROSS_COMPILE=3Daarch64-elf- HOSTCC=3Dclang Signed-off-by: Bertrand Marquis Change-Id: Iba91634afbaab58767bb8744b4b722ce5732a6dd Acked-by: Jan Beulich Acked-by: Roger Pau Monn=C3=A9 --- Changes since v4: - Subect was "xen: Add Darwin.mk for GNU toolchains" but remove the GNU toolchains part as this could also work with Clang - remove 'cd xen' from commit message - simplify comment in Darwin.mk and rework commit message. Changes since v3: - set XEN_COMPILE_ARCH to unknown instead of Darwin - list binutils as a dependency to install in brew in commit message Changes since v2: - Subject was "xen: Add macOS hypervisor build configuration" - Update Darwin.mk comments to more accurate versions (Jan) - Remove the build-on-macos help as we have no dependency on anything coming from brew anymore and the toolchain can be retrieved by lots of other solutions than brew on mac os. Switch to a simple doc in the commit message instead --- config/Darwin.mk | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 config/Darwin.mk diff --git a/config/Darwin.mk b/config/Darwin.mk new file mode 100644 index 000000000000..b1fc9ca859b0 --- /dev/null +++ b/config/Darwin.mk @@ -0,0 +1,6 @@ +# Use GNU tool definitions as the tools we are using are either GNU compat= ible +# or we only use features which are supported on Mac OS. +include $(XEN_ROOT)/config/StdGNU.mk + +# Cross compile on Mac OS, only hypervisor build has been tested, no tools +XEN_COMPILE_ARCH =3D unknow --=20 2.52.0