From patchwork Fri Aug 30 00:50:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 172661 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3000443ily; Thu, 29 Aug 2019 17:51:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJKagdeON3qyG171/XFEB30P8jDnqpFjHDvj8+KkS+7S6z+aqPvjtHUPbC1yT/bzHS79eR X-Received: by 2002:a17:902:a50a:: with SMTP id s10mr12854092plq.108.1567126262995; Thu, 29 Aug 2019 17:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567126262; cv=none; d=google.com; s=arc-20160816; b=0kTvjkYvMDjdb5SlFeQ7nK93m466OJhgYKW470x+81KDreYcTwscrXAKI3NYA0UOSk RZOe7pHRXqMFri/ktVXL6OLxlZ/E+AQ5dWjlFAWJbmRxOOIZcmxqYyr9OxixBAOc1+da BsHbOdCwBlFyZcs8xMYw9T95/YdKuReFW7W4UCveNTFXMnCywBp3zw1DlHNPTsH9RJYa +PNBNpXljrUjmlV7sbzA60qEKZfjzTz3Csa+VbubsOiSZd4dtZbrnAMyqIQ8CHMTum4O cSFkCRZeptTZOEvTeGdheTMmcfNR7Hz+I0QgMiGdSk7fwdX8VVpXHkz8khEircFihNXu Ns9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=mY025N9ZTLshq6bUASscJHYyFWN73WCKPGSueHP30TA=; b=ma+dTFSo93qcZdCY6BjObmTJeR0uFYV6iNkaONStRsLCt98bSn1k6nxFhSIBCXTa4p 8sU5fZYIRJCql0OV02LY/M/H0DcBq/qQHU4nH3bkV16X3nGIs12znzVvM6uA74IiD0jE GA/vMjOowRl8cgnk6DA5kAxO6qFvzhA23nxPi3Du9iSQY5kY8YTH/XBbdn0aTt0x8Zca iU/DQX8KFsTeHKt7KIc6Aw289zpeAQKKCLO9q0Oi9Ng/IdyNV6dCa0AF5H9qQJAvs0T5 X4Fawwjp9el6a9LuEf6m4Ohn3Ec8fdzXN4bQH20E1jzwf8w6sJnwPdZX37MNmUwWsgdc /1RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Okdsp5Zx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si3150116pgn.149.2019.08.29.17.51.02; Thu, 29 Aug 2019 17:51:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Okdsp5Zx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727968AbfH3AvB (ORCPT + 28 others); Thu, 29 Aug 2019 20:51:01 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:34882 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727892AbfH3Au4 (ORCPT ); Thu, 29 Aug 2019 20:50:56 -0400 Received: by mail-lj1-f194.google.com with SMTP id l14so4830761lje.2 for ; Thu, 29 Aug 2019 17:50:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mY025N9ZTLshq6bUASscJHYyFWN73WCKPGSueHP30TA=; b=Okdsp5ZxNf0c0ZS1PgudZ1/Uzcx1vh+JyUHLIBaB4gA9eHqIu0am2+/xAGRamBrEmK qCvznYgVkMcSDDWdiuCGk34vVj8/mP+ro1bCTjA8Ka3xrOrkCNjL5U6xgrBRNELJmuje tp5PnYpAOK9+P7pd2AMtrpQ2VFUiwZgdf+VjTUiXBMwwiLm0B+wHxS9J4hkKQKTR1PMo g5JzQdW9lrRdG4QItLYA3aqHsMKgs2n4aIc4BsxCiDVNYjJ1gBnQXG5diF7z2I2DKLba 2UWvt484BgUsrYmmG+TmQ/bM0gM9QCmze3gdMrsQwFGwno6fmli/VeP2qEfoN4+I/6o0 LHHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mY025N9ZTLshq6bUASscJHYyFWN73WCKPGSueHP30TA=; b=anAY+rkZy8HLJdcAay7AIkwcdOUEVml2xpd+zClcoyPtQOucTqD99EayhYz0+ORpd8 cMkiLTiTuac+ITdFIXc24EAKD04CBxbkKZ7nHXtwbPxVC0MdEQ0FKi/vYeW3W2D100TV fGSVLMjhb4Yg0zr/Ch36hO6jJJQRMqPMXJJ/CT2LIHGN5BXQWl6pFY6CAFghTMVwy1Ex VfqXZeLo5FAhGjT15BZiqXHkAKIdI8lS2bYPn/OvBXlCjooP7BZ324kjtJeg5G8JhvLW HRKcR1/TsmS2JZ3oXv+Q8i8ocp4wa5VTkHec4jE0gp9TZ1dAM+Hd3ZLMvfqyVY40O7fJ glKQ== X-Gm-Message-State: APjAAAUHlTGoRAv9bktXo9GrnNCy15XeqAQK+WVHdKYTvxEfVX+hl7Pe Mr7e3ur1yNWZdKdeDEVMOJjUnQ== X-Received: by 2002:a2e:2bda:: with SMTP id r87mr1097319ljr.3.1567126254430; Thu, 29 Aug 2019 17:50:54 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id f19sm628149lfk.43.2019.08.29.17.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 17:50:53 -0700 (PDT) From: Ivan Khoronzhuk To: linux@armlinux.org.uk, ast@kernel.org, daniel@iogearbox.net, yhs@fb.com, davem@davemloft.net, jakub.kicinski@netronome.com, hawk@kernel.org, john.fastabend@gmail.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, clang-built-linux@googlegroups.com, Ivan Khoronzhuk Subject: [PATCH RFC bpf-next 10/10] arm: include: asm: unified: mask .syntax unified for clang Date: Fri, 30 Aug 2019 03:50:37 +0300 Message-Id: <20190830005037.24004-11-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190830005037.24004-1-ivan.khoronzhuk@linaro.org> References: <20190830005037.24004-1-ivan.khoronzhuk@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The samples/bpf reuses linux headers, with clang -emit-llvm, so this w/a is only for samples/bpf (samples/bpf/Makefile CLANG-bpf). It allows to build samples/bpf for arm on target board. In another way clang -emit-llvm generates errors like: :1:1: error: unknown directive .syntax unified I have verified it on clang 5, 6 ,7, 8, 9, 10 as on native platform as for cross-compiling. This decision is arguable, but it doesn't have impact on samples/bpf so it's easier just ignore it for clang, at least for now... Signed-off-by: Ivan Khoronzhuk --- arch/arm/include/asm/unified.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/arm/include/asm/unified.h b/arch/arm/include/asm/unified.h index 1e2c3eb04353..3cf8757b9a14 100644 --- a/arch/arm/include/asm/unified.h +++ b/arch/arm/include/asm/unified.h @@ -11,7 +11,11 @@ #if defined(__ASSEMBLY__) .syntax unified #else -__asm__(".syntax unified"); + +#ifndef __clang__ + __asm__(".syntax unified"); +#endif + #endif #ifdef CONFIG_CPU_V7M