[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190830005037.24004-11-ivan.khoronzhuk@linaro.org>
Date: Fri, 30 Aug 2019 03:50:37 +0300
From: Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
To: linux@...linux.org.uk, ast@...nel.org, daniel@...earbox.net,
yhs@...com, davem@...emloft.net, jakub.kicinski@...ronome.com,
hawk@...nel.org, john.fastabend@...il.com
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, bpf@...r.kernel.org,
clang-built-linux@...glegroups.com,
Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
Subject: [PATCH RFC bpf-next 10/10] arm: include: asm: unified: mask .syntax unified for clang
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:
<inline asm>: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 <ivan.khoronzhuk@...aro.org>
---
arch/arm/include/asm/unified.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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
--
2.17.1
Powered by blists - more mailing lists