Hi Roger,

> On 10 Feb 2026, at 16:11, Roger Pau Monne <[email protected]> wrote:
> 
> GNU assembler will consider '/' as the start of comment marker on some
> platforms.  This is incorrect with Xen's usage, which does use '/' in
> assembly files as a mathematical operator.
> 
> The behavior of the assembler can be altered by passing the --divide
> option; unconditionally pass this option when available to force the
> expected behavior.

This is solving the issue and I can build for arm with what and further
for x86 on mac os but it fails on check-endbr.sh:

/bin/sh ../tools/check-endbr.sh xen-syms
stat: illegal option -- c

Cheers
Bertrand

> 
> Reported-by: Jan Beulich <[email protected]>
> Signed-off-by: Roger Pau Monné <[email protected]>
> ---
> xen/Makefile | 5 +++++
> 1 file changed, 5 insertions(+)
> 
> diff --git a/xen/Makefile b/xen/Makefile
> index 31352d4cd260..eee0262933a7 100644
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -405,6 +405,11 @@ $(call cc-option-add,CFLAGS,CC,-Winit-self)
> CFLAGS += -pipe -D__XEN__ -include $(srctree)/include/xen/config.h
> CFLAGS-$(CONFIG_DEBUG_INFO) += -g
> 
> +# The GNU assembler will interpret '/' as a comment start marker instead of a
> +# divide on some platforms.  Pass --divide when when available to signal '/' 
> is
> +# always used as an operator in assembly.
> +$(call cc-option-add,CFLAGS,CC,-Wa$$(comma)--divide)
> +
> ifneq ($(CONFIG_CC_IS_CLANG),y)
> # Clang doesn't understand this command line argument, and doesn't appear to
> # have a suitable alternative.  The resulting compiled binary does function,
> -- 
> 2.51.0
> 

Reply via email to