[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] xen: always consider '/' as a division in assembly
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Tue, 10 Feb 2026 16:11:10 +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=wsE9FTz/cjt2Wqol+CkTbLxLLvXw0H9d+61lnykmx0Y=; b=RRXGVmdiQeK5VVKltNHJuF/dX1igbEbIPgHrJWk8rZhqFAITzMwZ8O6ynGa4Z/1uviuUm0WvG9q4uenDWKElN2nLNDvTiDVLW5HwxUs9vaj+izKFoyFVDXOASZ5425bO94cr4nvEnDoJrsiVJrTYDGDGQ74x0GZohMCqFXRR7imrBbPVPt2C4gERLnst+El/zW4Xk+sWu3wJEWe0ee4V2bbtijrikWoxKSj+4LKXydI17AWPPbfHaSeWqU311/hGCxo3pxJ0ZpUw5ZjUs4W50v36tv9kTaebdkFnMDHXThRilovCt1cUBpM+bY7tSD3DpehsPvyj4TUBcsRznXosrw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CmQLan/T42OyynObYDzX/IL55HyKfEnHGU1OAij7CDjaESjTJQ6WWl0AbJdpAlFNFk4EfkbKwo4iTGJjbDVTViGxnurwLhzzbpFGPSfEPJ7wEotrNQh6yb8UFAF0VCBMXNjoj3rWrYDWGdfNyOH50cEBLZVLGAkB8gezYPCNU68qfcwHSSIRLJURZpFkCPp531kzq6EcpQn+E50XfGQo0lQuv4hIPt+c52TTHdqjCQc6Cpr95uvkfK4zjiDsrkuNleC7H5pMFWyU7WfOVNADtJHcX2zxe5qKQCHwYZfvo+YGzCsNO9bfBYyvt0aaSDNNkMRVEmhKs6nY9MhVLAtbOg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Tue, 10 Feb 2026 15:11:35 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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@xxxxxxxx>
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
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
|