ARM: error out if compiling ARMv6 using Clang before 8.0
PATCH v2 1/1 ARM: error out if compiling ARMv6 using Clang before 8.0
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 <[email protected]>
Signed-off-by Stefan Agner <[email protected]>
--- include/linux/compiler-clang.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/compiler-clang.h +4 -0
@@ -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 */
Signature · 1 line
2.19.1