linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: error out if compiling ARMv6 using Clang before 8.0
@ 2018-10-15 18:55 Stefan Agner
  0 siblings, 0 replies; only message in thread
From: Stefan Agner @ 2018-10-15 18:55 UTC (permalink / raw)
  To: linux-arm-kernel

The kernel passes the ArmV6K architecture to the compiler when
using the multi platform selection and enabling ARMv6. Clang
older than version 8.0 emit assembly with an non-existing CPU,
which then makes the GNU assembler fail. Warn users when
compiling ARMv6 using Clang before 8.0.

Suggested-by: Russell King <linux@armlinux.org.uk>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Link: https://github.com/ClangBuiltLinux/linux/issues/55
---
 include/linux/compiler-clang.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
index b1ce500fe8b3..9df8713bef38 100644
--- a/include/linux/compiler-clang.h
+++ b/include/linux/compiler-clang.h
@@ -3,6 +3,10 @@
 #error "Please don't include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead."
 #endif
 
+#if defined(CONFIG_ARCH_MULTI_V6) && CONFIG_CLANG_VERSION < 80000
+#error "Sorry, your compiler is too old - please upgrade it."
+#endif
+
 /* Some compiler specific definitions are overwritten here
  * for Clang compiler
  */
-- 
2.19.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-15 18:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-15 18:55 [PATCH v2] ARM: error out if compiling ARMv6 using Clang before 8.0 Stefan Agner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).