From nobody Mon Feb 9 15:39:49 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 1770394931080208.6285419083448; Fri, 6 Feb 2026 08:22:11 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1223624.1531094 (Exim 4.92) (envelope-from ) id 1voOag-0006AU-7b; Fri, 06 Feb 2026 16:21:54 +0000 Received: by outflank-mailman (output) from mailman id 1223624.1531094; Fri, 06 Feb 2026 16:21:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1voOag-0006AN-3o; Fri, 06 Feb 2026 16:21:54 +0000 Received: by outflank-mailman (input) for mailman id 1223624; Fri, 06 Feb 2026 16:21:53 +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 1voOaf-0006AB-4w for xen-devel@lists.xenproject.org; Fri, 06 Feb 2026 16:21:53 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id f1e6e323-0377-11f1-b161-2bf370ae4941; Fri, 06 Feb 2026 17:21:52 +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 316EC339; Fri, 6 Feb 2026 08:21:45 -0800 (PST) Received: from C3HXLD123V.arm.com (unknown [10.57.55.24]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CBD193F632; Fri, 6 Feb 2026 08:21:49 -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: f1e6e323-0377-11f1-b161-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 v4] xen: Add Darwin.mk for GNU toolchains Date: Fri, 6 Feb 2026 17:21:44 +0100 Message-ID: X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1770394932457154100 Content-Type: text/plain; charset="utf-8" Xen does not provide a Darwin build configuration for selecting GNU tool definitions. On macOS, the tools we use are either GNU compatible or we only rely on features supported by Mac OS, so using the GNU tool definitions is appropriate. Add config/Darwin.mk to include StdGNU.mk and force XEN_COMPILE_ARCH=3Dunknown, ensuring Darwin builds always follow the cross-compile path as we depend on the Linux ABI so compiling on Mac OS is always a cross compilation case. An example of how to build the hypervisor for arm64 on Mac OS (tools cannot be build for now) using a toolchain from brew: - brew install aarch64-elf-gcc aarch64-elf-binutils - cd xen - make XEN_TARGET_ARCH=3Darm64 CROSS_COMPILE=3Daarch64-elf- HOSTCC=3Dclang Signed-off-by: Bertrand Marquis Acked-by: Roger Pau Monn=C3=A9 --- 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 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 config/Darwin.mk diff --git a/config/Darwin.mk b/config/Darwin.mk new file mode 100644 index 000000000000..176b27eac676 --- /dev/null +++ b/config/Darwin.mk @@ -0,0 +1,7 @@ +# 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 + +# Xen uses Linux'es ABI so we are cross compiling on Mac OS. +# Force COMPILE_ARCH to a fake value to make sure it is always the case. +XEN_COMPILE_ARCH =3D unknown --=20 2.52.0