All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: always consider '/' as a division in assembly
@ 2026-02-10 15:11 Roger Pau Monne
  2026-02-10 15:27 ` Jan Beulich
  2026-02-10 15:44 ` Bertrand Marquis
  0 siblings, 2 replies; 11+ messages in thread
From: Roger Pau Monne @ 2026-02-10 15:11 UTC (permalink / raw)
  To: xen-devel
  Cc: Bertrand Marquis, Roger Pau Monne, Andrew Cooper, Anthony PERARD,
	Michal Orzel, Jan Beulich, Julien Grall, Stefano Stabellini

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.

Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 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



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

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

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 15:11 [PATCH] xen: always consider '/' as a division in assembly Roger Pau Monne
2026-02-10 15:27 ` Jan Beulich
2026-02-10 15:53   ` Roger Pau Monné
2026-02-10 16:09     ` Jan Beulich
2026-02-10 15:44 ` Bertrand Marquis
2026-02-10 15:55   ` Roger Pau Monné
2026-02-10 15:57     ` Bertrand Marquis
2026-02-10 16:09       ` Roger Pau Monné
2026-02-10 16:15         ` Jan Beulich
2026-02-10 16:19           ` Bertrand Marquis
2026-02-10 16:20         ` Bertrand Marquis

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.