xen/x86: always consider '/' as a division in assembly

On x86 GNU assembler will consider '/' as the start of comment marker for
some ELF targets.  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>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Roger Pau Monne committed 2026-02-12 19:21:46 +01:00
1 parent 3ea44aa78c
commit 6ccdd6cb46
1 file changed
+5
+5
View File
@@ -123,3 +123,8 @@ endif
# Set up the assembler include path properly for older toolchains.
CFLAGS += -Wa,-I$(objtree)/include -Wa,-I$(srctree)/include
# The GNU assembler will interpret '/' as a comment start marker instead of a
# divide for some ELF targets. Pass --divide when when available to signal '/'
# is always used as an operator in assembly.
$(call cc-option-add,CFLAGS,CC,-Wa$$(comma)--divide)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.