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@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
# 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.
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
LDFLAGS += $(LDFLAGS-y)
+include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
+
include Makefile
DEPS = .*.d