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

[Xen-devel] [PATCH 02/34] xen: clang: Disable built-in assembler



Clang 3.5 is trying to parse every assembly line in C file. The files
asm-offsets.c are taking advantage of the inline assembly but doesn't
produce valid assembly.

x86_64/asm-offsets.c:26:5: error: unexpected token at start of statement
    OFFSET(UREGS_r15, struct cpu_user_regs, r15);
        ^
x86_64/asm-offsets.c:22:5: note: expanded from macro 'OFFSET'
    DEFINE(_sym, offsetof(_str, _mem));
        ^
x86_64/asm-offsets.c:18:31: note: expanded from macro 'DEFINE'
    __asm__ __volatile__ ( "\n->" #_sym " %0 " #_val : : "i" (_val) )
                                  ^
<inline asm>:2:1: note: instantiated into assembly here
->UREGS_r15 $0 offsetof(struct cpu_user_regs, r15)

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
Cc: Keir Fraser <keir@xxxxxxx>
---
 xen/Rules.mk |    1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 18fbd62..ce54926 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -74,6 +74,7 @@ AFLAGS-y                += -D__ASSEMBLY__ -include 
$(BASEDIR)/include/xen/config
 
 # Clang's built-in assembler can't handle .code16/.code32/.code64 yet
 AFLAGS-$(clang)         += -no-integrated-as
+CFLAGS-$(clang)         += -no-integrated-as
 
 ALL_OBJS := $(ALL_OBJS-y)
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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