Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4431349pxv; Tue, 27 Jul 2021 07:14:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxl8EmmJP9Whh7S3l3YBmxD9r29v1aNkfW5iRxR+EUsCjp90zwg3geD7b2nB0QlliXmnm18 X-Received: by 2002:a05:6e02:1a6d:: with SMTP id w13mr15906673ilv.299.1627395241331; Tue, 27 Jul 2021 07:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627395241; cv=none; d=google.com; s=arc-20160816; b=ZFJBnnAOvuOEcKWIELhEDxkv8I221PJRfTr2yz44PAzf3fjFCvXaG9UQNutmDjc944 kTgCF1lhFFXtjVRB6ekl+a3WBcLbiofwBuKqdghn53Nw5NBbOwbhT6XwmCfBhpjL/vGH 0QamUTouSSN68RjKyJ+3Py9m1puigVO1gvcj30G5yx6YdeOFreP0sfTddGuirP4uOcX3 smlGUmJaSKPRp8l0IgA1ghQznDNCcze4F2h59J/FNh+6QClImCQTkj390PxMvta5AaR4 kz1p1TNhPMi+oD7gGULwFNpBuXhvhPO/wS8lKudtpxUdKICZ3lpQjm2cYvPf+f+2DvyH 6q3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=QR9jJL/Uvm+62LnA1ziwlgBrfvBLKf5QTJFduM8WRLQ=; b=i/h5OCN0sJ+9nb01iFRwrEJdG7zfGe93hHrwjDHh1oe4QuTM13xLotvad/42rQxwCL l15bc0PYN7JwGCehYfIrk+1qYFRK41THKMIENlyNlST42jCHduApD/zFOX9SmIQhGl2V yTYeW90QJQ0bazLzL6vgjEigPHGd2XkES/TO24Vlcz0FQOUrBCUCIcvshrS8cZMM9kKP lwmTEjWR/VIYUJckbLRL3nAjU2nMilP9qBousQsiWTzCUC1Ot5bhji6D2T34gG6WymO8 85GW70I9P90Amjx7HUeBQVkybSxmUqK5dIf9l3+3tpjqUEvEN80zWWL88XVe60xEz+bN H1pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sartura-hr.20150623.gappssmtp.com header.s=20150623 header.b="uLpt/P7S"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si2992469ilg.24.2021.07.27.07.13.48; Tue, 27 Jul 2021 07:14:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sartura-hr.20150623.gappssmtp.com header.s=20150623 header.b="uLpt/P7S"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236864AbhG0OMx (ORCPT + 99 others); Tue, 27 Jul 2021 10:12:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236873AbhG0OMv (ORCPT ); Tue, 27 Jul 2021 10:12:51 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B21F8C0613D3 for ; Tue, 27 Jul 2021 07:12:50 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id e2so15396591wrq.6 for ; Tue, 27 Jul 2021 07:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=QR9jJL/Uvm+62LnA1ziwlgBrfvBLKf5QTJFduM8WRLQ=; b=uLpt/P7SkjsqhJX0t0OKhTNfWtkTuuNKxwTa4ggmLti9bIm5TWevV39qkTnl5v9H1b wnLXg8RW5gJxarh083ckdVB4ipK70go02tx1WPbg5kgGO4Zg6s9gZ30k6vuCLQc1Gi3z SoVTssc3aZwhpayiwuj7abx2Y5LrvVkXlI3SCoxxRXfnWUs7I8pEYS/fM0yJPxcBG8m7 svjrl21zl6B3w+4pNJv+O84zW2WysxKr8d8qDfxVhP4SONotsZf981JC/bRBi+9FTxpV tKSFckvkRjZzdkSUBpjUcnpHuQUfgIifJjUz+9IXjX7xQJZ2OaqJoO2gS2YFN4biFvDG /7IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QR9jJL/Uvm+62LnA1ziwlgBrfvBLKf5QTJFduM8WRLQ=; b=IP3iX9eq/XHXytlY1tXzOqe3innNfYeVNrlZ8h0ONUvVrL1yCPFlRT96qBpLpLISkV 6KWXpcizdznOrLD8CsI7xvOs+XgZ0xh9AFxvrq8QCXB8s7/8cr9fSi2/eps0+y9K0Ayb lAV2RAIvQY1bivXfbCYV+2BBhapwKAX/XLAOK/x0/UHICMlekf7qHG/Z13XnKER8pNM1 OSP7rimDEfrl+WYJTGobkKtM9J7Op2ZOUmdKX6wOXHu8dRcK9968s+rNWGSmxa8qtOHT tIgIMKAJO6m34f2pPjYWDo4l5wxIbfUEMkZQGaTFjEwxdSsB1qT3GryGp8t6FLrnZVCX gJqg== X-Gm-Message-State: AOAM533Qfa+QJnR6HE1Mx7kUDH11VaPfJ5QIYSKPbPuOs3lIxEfd0qn8 GUoQbzA/Gamum0fNfW+1TZ8Qag== X-Received: by 2002:adf:c3c5:: with SMTP id d5mr17081357wrg.76.1627395169375; Tue, 27 Jul 2021 07:12:49 -0700 (PDT) Received: from localhost.localdomain ([89.18.44.40]) by smtp.gmail.com with ESMTPSA id t1sm3403912wrm.42.2021.07.27.07.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 07:12:49 -0700 (PDT) From: Pavo Banicevic To: linux@armlinux.org.uk, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, nathan@kernel.org, ndesaulniers@google.com, ivan.khoronzhuk@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, clang-built-linux@googlegroups.com, matt.redfearn@mips.com, mingo@kernel.org, dvlasenk@redhat.com, juraj.vijtiuk@sartura.hr, robert.marko@sartura.hr, luka.perkov@sartura.hr, jakov.petrina@sartura.hr Subject: [PATCH 2/3] arm: include: asm: unified: mask .syntax unified for clang Date: Tue, 27 Jul 2021 16:11:18 +0200 Message-Id: <20210727141119.19812-3-pavo.banicevic@sartura.hr> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210727141119.19812-1-pavo.banicevic@sartura.hr> References: <20210727141119.19812-1-pavo.banicevic@sartura.hr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ivan Khoronzhuk 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/unified.h b/arch/arm/include/asm/unified.h index 1e2c3eb04353..8718f313e7c4 100644 --- a/arch/arm/include/asm/unified.h +++ b/arch/arm/include/asm/unified.h @@ -11,7 +11,9 @@ #if defined(__ASSEMBLY__) .syntax unified #else -__asm__(".syntax unified"); + +#ifndef __clang__ + __asm__(".syntax unified"); #endif #ifdef CONFIG_CPU_V7M -- 2.32.0