From patchwork Wed Apr 27 14:42:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 8958521 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CD6BFBF29F for ; Wed, 27 Apr 2016 14:45:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D97C6201C7 for ; Wed, 27 Apr 2016 14:45:02 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8628B2012B for ; Wed, 27 Apr 2016 14:45:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avQfo-0003dZ-PA; Wed, 27 Apr 2016 14:42:40 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avQfn-0003dO-7R for xen-devel@lists.xenproject.org; Wed, 27 Apr 2016 14:42:39 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 8C/2B-03443-EDFC0275; Wed, 27 Apr 2016 14:42:38 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsXitHRDpO7d8wr hBt8WG1h83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBkTDqxiKegSqnjx/S97A+N9vi5GTg4JAX+J 7mMX2EFsNgEdiYtzd7J1MXJwiAioSNzea9DFyMXBLPCaSeL1/a+sIDXCAs4S/b+fsYDUsAioS rRcMQcJ8wq4SPz4foAZYqSuxMndm9gh4oISJ2c+YQGxmQU0JVq3/2aHsOUlmrfOBqsXElCU6J /3gA2il1vi9umpzBMYeWchaZ+FpH0WkvYFjMyrGDWKU4vKUot0DY31kooy0zNKchMzc3QNDYz 1clOLixPTU3MSk4r1kvNzNzECQ4oBCHYwbtvueYhRkoNJSZR3yVmFcCG+pPyUyozE4oz4otKc 1OJDjDIcHEoSvPvOAeUEi1LTUyvSMnOAwQ2TluDgURLhPQCS5i0uSMwtzkyHSJ1iVJQS5w0FS QiAJDJK8+DaYBF1iVFWSpiXEegQIZ6C1KLczBJU+VeM4hyMSsK8x0Gm8GTmlcBNfwW0mAlo8e VDsiCLSxIRUlINjEu1rA+0nRYN62Xv/GBQtObm6U83lD3C5TgO9tbK7U+U/Gq7/P02m0dvXs6 XNFRoMFt6w+HAoVtq56SvcB5W9vusVhAc1XG9qlch4IGUo8RDs751JSx5pkfVNk7ebrb0qtPn HfFqa7t3zTq3UlD7Urjm9VYW2fMKsvumaFbu/n9074kVm17MrlBiKc5INNRiLipOBACJZyWbo wIAAA== X-Env-Sender: prvs=918322aae=roger.pau@citrix.com X-Msg-Ref: server-10.tower-31.messagelabs.com!1461768156!36555470!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 37826 invoked from network); 27 Apr 2016 14:42:37 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-10.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 27 Apr 2016 14:42:37 -0000 X-IronPort-AV: E=Sophos;i="5.24,542,1454976000"; d="scan'208";a="350151917" From: Roger Pau Monne To: Date: Wed, 27 Apr 2016 16:42:27 +0200 Message-ID: <1461768147-24374-1-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) MIME-Version: 1.0 X-DLP: MIA2 Cc: Stefano Stabellini , Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Jan Beulich , Roger Pau Monne Subject: [Xen-devel] [PATCH for-4.7] build/xen: fix assembler instruction tests X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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é Reviewed-by: Wei Liu Reviewed-by: Jan Beulich --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- 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