[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5] xen: Add Darwin.mk


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 10 Feb 2026 12:41:35 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tyyNimg/FtAfI4mzmHk4UbzX5jVzi6UKZgL2Iphirqs=; b=N1Bo7RnNb95jUIee35mY/9do8ld/5dDGAtGs3bLuYIxubuhoHzmqBKH0ku1g/nxXk1mSC7Y6WovflwR4w+sRarE3baMxl7OZdk+6VE4bJSPHxvl4PuX2neFAQ/5rWEyztnta1bpxwoGV+lK5kzSX6igVCV2OiK6RFgD07UZXYUu98kAnyP2X9Mte1jPXJZOwg5MGBPfezrB1Z8HbP8xoh2vQ4+vAEEb90ZxHdQUJqPMFyk7+Gnv3vU33AAlGHZVaDQ8Lc27Fe+eG0KpDwJXTM17oY9aqDpsUYZlJIu+U6eMwnBsukWQrEb7shtKjeBQaUPFvPk8ZdPE3XD+MTDAxvQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JCfY/ZlAJu0F+iDTWf/iF4lFdqCu6kECdSeNL/0/cZr4oYY7DOVMHc70xjjutCFUyQDgdlZgEK8BiiuG4kng7zNHjTdHsQEVZPBX39OWG1L8xAXuz7qpyPj2+fF5qau2w8AKuTDsToAWZAUcoR6Z8o9pT5euusOWc0MTjJSN0rlERady/djQyo2acdsP+DTLHUXaqs4vQqqWRvqNBqSjjMbLJiYkU4nQ+MjrZ1THKcxdGqVocS1xv/TjxTmSJ04GpK0Npmjoc0D+z7VB2RAlRLaFOa2T3i+MdJfmqVjuRnoYqwVKwUKlttWJ5B/NtrhvflAS3GSoATDiVrNu4Y4Xxw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Bertrand Marquis <bertrand.marquis@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 10 Feb 2026 11:41:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Feb 10, 2026 at 11:46:44AM +0100, Jan Beulich wrote:
> On 09.02.2026 11:46, Bertrand Marquis wrote:
> > --- /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
> 
> While editing in the ABI aspect, it occurred to me to check what Apple has
> to say regarding their ABI. For both aarch64 and x86-64 they say they use
> the standard ABI with some modifications. We may want to evaluate whether
> those modifications are actually compatible with what we need.
> 
> Talking of x86-64: Has building on an x86 Mac been tested as well?
> Especially if that doesn't work, it may want mentioning.

I no longer have access to an x86 Mac, those are about to disappear.

FWIW, I build x86 on Mac using the Docker containers, just as the CI
does.  OSX Docker allows running x86 containers on arm64 using the
"Rosetta 2" binary translation layer.

I've attempted doing a cross-build from an arm64 Mac using the x86-elf
toolchain, but got the following error:

% make XEN_TARGET_ARCH=x86_64 CROSS_COMPILE=x86_64-elf- HOSTCC=gcc -C xen V=1
[...]
/Library/Developer/CommandLineTools/usr/bin/make -f ./Rules.mk obj=common 
need-builtin=1
  x86_64-elf-gcc -MMD -MP -MF common/.bitmap.o.d -m64 -DBUILD_ID 
-fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes 
-Wno-unused-but-set-variable -Wno-unused-local-typedefs   -O1 
-fno-omit-frame-pointer -nostdinc -fno-builtin -fno-common 
-fzero-init-padding-bits=all -Werror -Wredundant-decls -Wwrite-strings 
-Wno-pointer-arith -Wdeclaration-after-statement -Wuninitialized -Wvla 
-Wflex-array-member-not-at-end -Winit-self -pipe -D__XEN__ -include 
./include/xen/config.h -Wa,--strip-local-absolute -ffunction-sections 
-fdata-sections -g -malign-data=abi -mindirect-branch=thunk-extern 
-mindirect-branch-register -fno-jump-tables -mfunction-return=thunk-extern 
-Wa,-mx86-used-note=no  -fno-stack-protector -I./include -I./arch/x86/include 
-I./arch/x86/include/generated -DXEN_IMG_OFFSET=0x200000 -msoft-float -fno-pie 
-fno-exceptions -fno-asynchronous-unwind-tables -Wnested-externs 
-DHAVE_AS_QUOTED_SYM -DHAVE_AS_MOVDIR -DHAVE_AS_ENQCMD -DHAVE_AS_NOPS_DIRECTIVE 
-mno-red-zone -fpic -mno-mmx -mno-sse -mskip-rax-setup -fcf-protection=branch 
-mmanual-endbr -fno-jump-tables 
-mmemcpy-strategy=unrolled_loop:16:noalign,libcall:-1:noalign 
-mmemset-strategy=unrolled_loop:16:noalign,libcall:-1:noalign -Wa,-I./include 
-Wa,-I./include '-D__OBJECT_LABEL__=common/bitmap.o' 
-mpreferred-stack-boundary=3   -c common/bitmap.c -o common/.bitmap.o.tmp -MQ 
common/bitmap.o
./arch/x86/include/asm/bitops.h: Assembler messages:
./arch/x86/include/asm/bitops.h:511: Error: found '
', expected: ')'
./arch/x86/include/asm/bitops.h:511: Error: found '
', expected: ')'
./arch/x86/include/asm/bitops.h:511: Error: found '
', expected: ')'
./arch/x86/include/asm/bitops.h:511: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:20: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:20: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:21: Error: alternative feature outside of 
featureset range
./arch/x86/include/asm/nospec.h:20: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:20: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:21: Error: alternative feature outside of 
featureset range
./arch/x86/include/asm/nospec.h:28: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:28: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:29: Error: alternative feature outside of 
featureset range
./arch/x86/include/asm/nospec.h:28: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:28: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:29: Error: alternative feature outside of 
featureset range
./arch/x86/include/asm/nospec.h:28: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:28: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:29: Error: alternative feature outside of 
featureset range
./arch/x86/include/asm/nospec.h:20: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:20: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:21: Error: alternative feature outside of 
featureset range
./arch/x86/include/asm/nospec.h:20: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:20: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:21: Error: alternative feature outside of 
featureset range
./arch/x86/include/asm/nospec.h:28: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:28: Error: found '
', expected: ')'
./arch/x86/include/asm/nospec.h:29: Error: alternative feature outside of 
featureset range

I haven't investigated further.  Seems like some issue with
alternative and the uses of CPUID defines.  We probably want to
mention in the commit message that only arm64 builds have been tested
so far.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.