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

[Xen-changelog] [xen master] x86: move and fix clang .skip check



commit ef286f67787aa7f3599e0bc1046bfc763582a817
Author:     Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Fri Nov 29 17:10:26 2019 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Nov 29 17:10:26 2019 +0100

    x86: move and fix clang .skip check
    
    .skip is only used by x86 code, so place the clang .skip with labels
    check in x86/Rules.mk instead of the top level Rules.mk. While there
    also fix an issue with it by removing the '\n' which triggers the
    following error:
    
    <stdin>:1:31: error: missing terminating '"' character 
[-Werror,-Winvalid-pp-token]
    void _(void) { asm volatile ( ".L0:
                                  ^
    <stdin>:1:31: error: expected string literal in 'asm'
    <stdin>:3:18: error: missing terminating '"' character 
[-Werror,-Winvalid-pp-token]
    .skip (.L1 - .L0)" ); }
                     ^
    <stdin>:3:24: error: expected ')'
    .skip (.L1 - .L0)" ); }
                           ^
    <stdin>:1:29: note: to match this '('
    void _(void) { asm volatile ( ".L0:
                                ^
    <stdin>:3:24: error: expected '}'
    .skip (.L1 - .L0)" ); }
                           ^
    <stdin>:1:14: note: to match this '{'
    void _(void) { asm volatile ( ".L0:
                 ^
    5 errors generated.
    
    Suggested-by: Jan Beulich <jbeulich@xxxxxxxx>
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    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>
---
 xen/Rules.mk          | 7 -------
 xen/arch/x86/Rules.mk | 5 +++++
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index b0bc7601c1..5aba841b0a 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -76,13 +76,6 @@ endif
 
 AFLAGS-y                += -D__ASSEMBLY__
 
-# Older clang's built-in assembler doesn't understand .skip with labels:
-# https://bugs.llvm.org/show_bug.cgi?id=27369
-ifeq ($(clang),y)
-$(call as-option-add,CFLAGS,CC,".L0:\n.L1:\n.skip (.L1 - .L0)",,\
-                     -no-integrated-as)
-endif
-
 ALL_OBJS := $(ALL_OBJS-y)
 
 # Get gcc to generate the dependencies for us.
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index 0794afa3c3..a3c5eb9de7 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -74,6 +74,11 @@ ifeq ($(clang),y)
 # Note: Any test which adds -no-integrated-as will cause subsequent tests to
 # succeed, and not trigger further additions.
 
+# Older clang's built-in assembler doesn't understand .skip with labels:
+# https://bugs.llvm.org/show_bug.cgi?id=27369
+$(call as-option-add,CFLAGS,CC,".L0: .L1: .skip (.L1 - .L0)",,\
+                     -no-integrated-as)
+
 # Check whether clang asm()-s support .include.
 $(call as-option-add,CFLAGS,CC,".include \"asm/indirect_thunk_asm.h\"",,\
                      -no-integrated-as)
--
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®.