[v2,1/2] x86: fix clang .macro retention check
diff mbox series

Message ID eb364fd9-cbaa-fc52-5205-2961823b324a@suse.com
State New
Headers show
  • x86: clank build check adjustments
Related show

Commit Message

Jan Beulich Nov. 15, 2019, 10:48 a.m. UTC
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>
v2: Also replace \n by semicolons.

This needs to be tested in an environment where this was actually found
to matter; I can't see how it can have worked in its former shape. I
also don't understand why the same commit introducing the check that
gets fixed here put the .skip check in xen/Rules.mk - the only use of
.skip that I can spot is in x86 code.

diff mbox series

--- a/Config.mk
+++ b/Config.mk
@@ -6,6 +6,8 @@  endif
 # Convenient variables
 comma   := ,
+open    := (
+close   := )
 squote  := '
 #' Balancing squote, to help syntax highlighting
 empty   :=
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -81,6 +81,6 @@  $(call as-option-add,CFLAGS,CC,".include
 # 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",\