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

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


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 10 Feb 2026 12:56:43 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=citrix.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=LJnx4XfNJHMESMghr1QwrT2awZcglI5QGqVQ9GacbY0=; b=xviYF4aWiXJxh0CBLzMD8C6ehnfBsYowGdl6hP9QkC3LYv3/tHvEZGv9MzUIMyVSA6c8VeAOR9LxGl6zmc9POiXHxBaLvJtAQ2PMkPd5Vw4gobOkDKoUPgiUBGD9/k2OY7vit5xSLc1eBbWlsoj4fifyHZZTBWsFVH39vIhxqCFU1aLKhIQ+G3YyMH/PYxz6CSu+mwofiqkupBRDImMeCO1OLLLlQZVBEd/2PyqTTBUdlBbk9QWrSjh/D+aI6MTxKbHKIT9SvBBoCqNo7X4KdToB+7j1bxWrW/ClrqEPrGCWhzl/c5Ioi1rKL09gC1hq0sERa0JYF8vOy09I5NPJRQ==
  • 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=LJnx4XfNJHMESMghr1QwrT2awZcglI5QGqVQ9GacbY0=; b=JWthQzKOEsh5QHNHbfkl0+NBmPT7bcs4p1gTeDrehXimM7aPN9cWC3voX61UokL+LyFtuJGGEhJmi9lHKGH0vx9KZVb8jSBVD908n/cZiUgdhcXnJ3YFvPKwvalUR85xe/goaeMol3vPjAoC70U1GKpoPirIOJXybjNcitoZ3DhCqSVoiwD7a94DV5cY7C1SoUpzMIvL9Av27odKmFY3wCZs3xsOGAgMV4lT0UggfS4jqOCdvZ9LKQCOK1+5GdDewI2LrNwFERecrQr9qyp5A5o/ui3cP4x4MLHsppoRqVACMdH/w+a/z/DnGrpjXmsCWN2Yc6YT9n5sOh2sAmPX/A==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=V8+B5pjna9zhvmexlMEA58W95SNPoVa+FrzaKpta38WAl/+Wsp1bPMPANdEC6maFbdor/JkiKqonSsGeXz0eCEN8d0ZU5mC/o+tDgXNy1lOu2CeTUeEbWrpO9sShzai2ufbJQJAxBt1eQu3TNgGQV2WCh9oyh/FUqithIlR6macEG4DB9ZXsIXV/WWCHDiDxOMRqcvcnUaJ4y3BFlK34Lmu/JyXiCqbYGUMyNXvWrt0mCJFzeUXpJ1ZkyLf/vb23sDGceYHqDUlybk80SMn/UVpd2PKPDx4CTjIW/KT/ug7ZmJMjNmNCLhJsxqdROY1wYE5HkjHuXwwY5aAgEZ6Ihw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PWF0TcSima+9URiVJCkcqZV0Mvj1MzN7wmpbuc4xUl4MJI0ET1wwgfsT7ONYY6bCVwKHq32nH8UhyxS1fbIDgy/u3UwSCmzmcgJa52pwA1X6tvh8vE/eOlNHnmE5Tf1EU2boMPFoiz2Z2pRY1aQCLOxonmLg+ouhlTShwzK1QjKrpAQzsX0OPFp/DRUV7HejQ39Htuw4bnO3FJT1n9z69LVGnDJAJvK8mS28lY1ET0RD+lT4F62MSu965pvQpZNa8NO767i3u9AskzbhLi+z/b5zikBCogHvYlbOPquQfam4LYDpXOLpT2XcZi2ezKVe8uh8vwHlTJTYmT4aow8DSA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, 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" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 10 Feb 2026 12:58:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHcmbF131JHt0VrQEG2yzDmCYz1i7V7wbUAgAAPU4CAABTygA==
  • Thread-topic: [PATCH v5] xen: Add Darwin.mk

Hi Roger,

> On 10 Feb 2026, at 12:41, Roger Pau Monné <roger.pau@xxxxxxxxxx> wrote:
> 
> 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.

I just tried the same and could reproduce that.

This is apparently not related to mac os but to binutils (2.45.1 on my side)

After some digging i found out that this can be triggered with a simple 
assembler test where
.if (2/32) 
triggers the same error, while
.if 2/32
is fine (ie parenthesis are the source of the issue).

So the same error would probably occur with the same binutils version in linux 
i guess (unless it
brew specific version or patches which are creating that).

I did not dig further than that but we should keep that in mind in case this 
comes back in other
scenarios.

Cheers
Bertrand

> 
> Thanks, Roger.



 


Rackspace

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