[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86: fix clang .macro retention check



commit d0d72e60f5fe2debf862cb2c3455777c240c5dcc
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Nov 29 17:10:00 2019 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Nov 29 17:10:00 2019 +0100

    x86: fix clang .macro retention check
    
    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@xxxxxxxx>
    Tested-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> [On FreeBSD and Debian 
9.5]
    Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 Config.mk             | 2 ++
 xen/arch/x86/Rules.mk | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Config.mk b/Config.mk
index 0fa4591379..4735a1bfd0 100644
--- a/Config.mk
+++ b/Config.mk
@@ -6,6 +6,8 @@ endif
 
 # Convenient variables
 comma   := ,
+open    := (
+close   := )
 squote  := '
 #' Balancing squote, to help syntax highlighting
 empty   :=
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index 659ac3d83e..0794afa3c3 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -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
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.