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

[Xen-changelog] [xen master] build/xen: fix assembler instruction tests



commit 7fb252bd41da06647c9783a0716ba29e0f15cec6
Author:     Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Thu Apr 28 15:07:37 2016 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Apr 28 15:07:37 2016 +0200

    build/xen: fix assembler instruction tests
    
    The current test performed in order to check if the assembler supports
    certain instructions doesn't take into account the value of AFLAGS, which
    when using clang contains the option that disables the integrated assembler
    due to the lack of features.
    
    As a result of this, the current instruction tests were performed against 
the
    integrated assembler, but then at build time the non-integrated assembler
    was used. If both have feature-parity, this is a non-issue, but we cannot
    assume this.
    
    Fix this by passing AFLAGS in the instruction test, and including the arch
    Rules.mk makefile after AFLAGS is set.
    
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 Config.mk    | 2 +-
 xen/Rules.mk | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index 4a5ebed..9b097c9 100644
--- a/Config.mk
+++ b/Config.mk
@@ -132,7 +132,7 @@ $(eval $(check-y))
 # as-insn: Check whether assembler supports an instruction.
 # Usage: cflags-y += $(call as-insn "insn",option-yes,option-no)
 as-insn = $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \
-                       | $(1) -c -x c -o /dev/null - 2>&1),$(4),$(3))
+                       | $(1) $(AFLAGS) -c -x c -o /dev/null - 2>&1),$(4),$(3))
 
 # as-insn-check: Add an option to compilation flags, but only if insn is
 #                supported by assembler.
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 7183d69..961d533 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -38,8 +38,6 @@ override TARGET_ARCH     := $(shell echo $(XEN_TARGET_ARCH) | 
\
 
 TARGET := $(BASEDIR)/xen
 
-include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
-
 # Note that link order matters!
 ALL_OBJS-y               += $(BASEDIR)/common/built_in.o
 ALL_OBJS-y               += $(BASEDIR)/drivers/built_in.o
@@ -92,6 +90,8 @@ LDFLAGS += $(LDFLAGS_DIRECT)
 
 LDFLAGS += $(LDFLAGS-y)
 
+include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
+
 include Makefile
 
 DEPS = .*.d
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

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