All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5] xen: Add Darwin.mk
@ 2026-02-09 10:46 Bertrand Marquis
  2026-02-09 13:01 ` Jan Beulich
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Bertrand Marquis @ 2026-02-09 10:46 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrew Cooper, Anthony PERARD, Michal Orzel, Jan Beulich,
	Julien Grall, Roger Pau Monné, Stefano Stabellini

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=unknown, 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=arm64 CROSS_COMPILE=aarch64-elf- HOSTCC=clang

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Change-Id: Iba91634afbaab58767bb8744b4b722ce5732a6dd
---
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 compatible
+# 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 = unknow
-- 
2.52.0



^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-02-10 13:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-09 10:46 [PATCH v5] xen: Add Darwin.mk Bertrand Marquis
2026-02-09 13:01 ` Jan Beulich
2026-02-09 13:19   ` Bertrand Marquis
2026-02-09 13:26 ` Roger Pau Monné
2026-02-09 13:33   ` Bertrand Marquis
2026-02-09 13:39     ` Roger Pau Monné
2026-02-09 13:42       ` Bertrand Marquis
2026-02-09 14:13         ` Jan Beulich
2026-02-09 14:17           ` Bertrand Marquis
2026-02-09 14:23         ` Roger Pau Monné
2026-02-10 10:46 ` Jan Beulich
2026-02-10 10:56   ` Bertrand Marquis
2026-02-10 11:41   ` Roger Pau Monné
2026-02-10 12:56     ` Bertrand Marquis
2026-02-10 13:45       ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.