From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: [PATCH 02/34] xen: clang: Disable built-in assembler Date: Tue, 25 Mar 2014 16:55:09 +0000 Message-ID: <1395766541-23979-3-git-send-email-julien.grall@linaro.org> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSUdh-00089c-FL for xen-devel@lists.xenproject.org; Tue, 25 Mar 2014 16:55:49 +0000 Received: by mail-ee0-f41.google.com with SMTP id t10so697923eei.28 for ; Tue, 25 Mar 2014 09:55:47 -0700 (PDT) In-Reply-To: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: stefano.stabellini@citrix.com, Keir Fraser , Julien Grall , tim@xen.org, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org 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) ) ^ :2:1: note: instantiated into assembly here ->UREGS_r15 $0 offsetof(struct cpu_user_regs, r15) Signed-off-by: Julien Grall Cc: Keir Fraser --- 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