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

[Xen-devel] [PATCH v4 4/4] build/clang: add a check whether the assembler supports .skip with labels



Or else switch off the integrated assembler. This is relevant for
older clang versions which integrated assembler don't support .skip
with labels.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Tim Deegan <tim@xxxxxxx>
Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 xen/Rules.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 322e11dba2..415b363859 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -72,7 +72,11 @@ 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
-AFLAGS-$(clang)         += -no-integrated-as
+ifeq ($(clang),y)
+ifeq ($(call as-insn,$(CC) $(AFLAGS),".L0:\n.L1:\n.skip (.L1 - .L0)",y,n),n)
+        AFLAGS += -no-integrated-as
+endif
+endif
 
 ALL_OBJS := $(ALL_OBJS-y)
 
-- 
2.16.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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