From patchwork Thu Nov 14 09:59:27 2019 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: 11243329 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 48CBA1390 for ; Thu, 14 Nov 2019 10:01:17 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 24192206D9 for ; Thu, 14 Nov 2019 10:01:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="E7RMNb6Y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24192206D9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iVBum-0006M5-Gr; Thu, 14 Nov 2019 09:59:48 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iVBul-0006Ly-4R for xen-devel@lists.xenproject.org; Thu, 14 Nov 2019 09:59:47 +0000 X-Inumbo-ID: 7c36cfde-06c5-11ea-a247-12813bfff9fa Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 7c36cfde-06c5-11ea-a247-12813bfff9fa; Thu, 14 Nov 2019 09:59:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1573725586; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=t9GV1NujlAmBFeTzafCMRyHB6hkDZoHx2Wt5XiKh5UQ=; b=E7RMNb6YIpK2hxtMRxbUbyTfJpcB265jHoWaHQU67nVrwNsPK1VhZ56K 84/otJLNu3o60jZcz3MkUbFganxwCR7lnmpknOJCa/FP+S3DYesd/UAaJ 0qn9GtFqXljSMzDIhRngCnmoalTg62d9g2FbfbITbPto/3e6KqCSYP6c7 o=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: hHYFKP4hFIE493L4ZFvEWze0Et6jHDjMrNRyN0BdUSmEFNzjz+i/JMkH3GlAluHe0WL8jeRf2Q eTn1JQ4T6HSDF7GIke3bnEmNs3zyuL3Bex1Yu8IakTit1RYL9j3VTapYItXFDxgeJGx8qj3N+o 8FTpTM7qRxLzHUbPBPZXPzbUC/xkFHyzEKmbY+NGqaYJNIqPcYKhq7v1VXb0e+ITkYFNmzmZ73 TE6CpxpmPM/cd9LfFwZLytpModJycbocPerAJapMnch7MNOMS9aqWFXBSFZkciVKgDmmZkdZ4J tq0= X-SBRS: 2.7 X-MesageID: 8427495 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.68,304,1569297600"; d="scan'208";a="8427495" From: Roger Pau Monne To: Date: Thu, 14 Nov 2019 10:59:27 +0100 Message-ID: <20191114095927.83723-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-4.13] x86/clang: move and fix .skip check X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" .skip is only used by x86 code, so place the clang .skip with labels check in x86/Rules.mk instead of the top level Rules.mk. While there also fix an issue with it by removing the '\n' which triggers the following error: :1:31: error: missing terminating '"' character [-Werror,-Winvalid-pp-token] void _(void) { asm volatile ( ".L0: ^ :1:31: error: expected string literal in 'asm' :3:18: error: missing terminating '"' character [-Werror,-Winvalid-pp-token] .skip (.L1 - .L0)" ); } ^ :3:24: error: expected ')' .skip (.L1 - .L0)" ); } ^ :1:29: note: to match this '(' void _(void) { asm volatile ( ".L0: ^ :3:24: error: expected '}' .skip (.L1 - .L0)" ); } ^ :1:14: note: to match this '{' void _(void) { asm volatile ( ".L0: ^ 5 errors generated. Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monné --- Cc: Juergen Gross --- NB: will need rebasing on top of Jan's patch (or the other way around). --- xen/Rules.mk | 7 ------- xen/arch/x86/Rules.mk | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 3090ea7828..d1c060c3cf 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -76,13 +76,6 @@ endif 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 -ifeq ($(clang),y) -$(call as-option-add,CFLAGS,CC,".L0:\n.L1:\n.skip (.L1 - .L0)",,\ - -no-integrated-as) -endif - ALL_OBJS := $(ALL_OBJS-y) # Get gcc to generate the dependencies for us. diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index 659ac3d83e..328bbfea9d 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -83,4 +83,9 @@ $(call as-option-add,CFLAGS,CC,".include \"asm/indirect_thunk_asm.h\"",,\ $(call as-option-add,CFLAGS,CC,\ ".macro FOO\n.endm\"); asm volatile (\".macro FOO\n.endm",\ -no-integrated-as) + +# Older clang's built-in assembler doesn't understand .skip with labels: +# https://bugs.llvm.org/show_bug.cgi?id=27369 +$(call as-option-add,CFLAGS,CC,".L0: .L1: .skip (.L1 - .L0)",,\ + -no-integrated-as) endif