From nobody Mon Feb 9 22:34:33 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 1770365878850206.17760784819166; Fri, 6 Feb 2026 00:17:58 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1222902.1530577 (Exim 4.92) (envelope-from ) id 1voH1v-00087P-TN; Fri, 06 Feb 2026 08:17:31 +0000 Received: by outflank-mailman (output) from mailman id 1222902.1530577; Fri, 06 Feb 2026 08:17:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1voH1v-00087I-Qo; Fri, 06 Feb 2026 08:17:31 +0000 Received: by outflank-mailman (input) for mailman id 1222902; Fri, 06 Feb 2026 08:17:30 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1voH1u-00084v-Rd for xen-devel@lists.xenproject.org; Fri, 06 Feb 2026 08:17:30 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 452dc470-0334-11f1-9ccf-f158ae23cfc8; Fri, 06 Feb 2026 09:17:26 +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 2ED0B339; Fri, 6 Feb 2026 00:17:19 -0800 (PST) Received: from C3HXLD123V.arm.com (unknown [10.57.55.24]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F048F3F740; Fri, 6 Feb 2026 00:17:23 -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: 452dc470-0334-11f1-9ccf-f158ae23cfc8 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 v3] xen: Add Darwin.mk for GNU toolchains Date: Fri, 6 Feb 2026 09:17:17 +0100 Message-ID: X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1770365879446158500 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=3DDarwin, 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 compiler from brew: - brew install aarch64-elf-gcc - cd xen - make XEN_TARGET_ARCH=3Darm64 CROSS_COMPILE=3Daarch64-elf- HOSTCC=3Dgcc Signed-off-by: Bertrand Marquis --- 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..427588eaf899 --- /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 Darwin --=20 2.52.0