]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
x86: fix clang .macro retention check
authorJan Beulich <jbeulich@suse.com>
Fri, 29 Nov 2019 16:10:00 +0000 (17:10 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 29 Nov 2019 16:10:00 +0000 (17:10 +0100)
There were two problems here: The first closing parentheses got parsed
by make to end the $(call invocation, and the escaping of the quotes
wasn't right either, as there's nowhere they would get un-escaped.

Furthermore there appears to be a puzzling problem with \n getting
expanded to an actual newline too early in some environments. Convert
these to semicolons at the same time.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Roger Pau Monné <roger.pau@citrix.com> [On FreeBSD and Debian 9.5]
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Config.mk
xen/arch/x86/Rules.mk

index 0fa4591379911e56049eef5684a2d7f08995b7b3..4735a1bfd0bc30101531c48c8af16420243c60d6 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -6,6 +6,8 @@ endif
 
 # Convenient variables
 comma   := ,
+open    := (
+close   := )
 squote  := '
 #' Balancing squote, to help syntax highlighting
 empty   :=
index 659ac3d83e1cae2fc436d1ee5d9a579eee5fc7ef..0794afa3c3793351d8cc156678adec63365e060a 100644 (file)
@@ -81,6 +81,6 @@ $(call as-option-add,CFLAGS,CC,".include \"asm/indirect_thunk_asm.h\"",,\
 # Check whether clang keeps .macro-s between asm()-s:
 # https://bugs.llvm.org/show_bug.cgi?id=36110
 $(call as-option-add,CFLAGS,CC,\
-                     ".macro FOO\n.endm\"); asm volatile (\".macro FOO\n.endm",\
+                     ".macro FOO;.endm"$$(close); asm volatile $$(open)".macro FOO;.endm",\
                      -no-integrated-as)
 endif