]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
arm, unwind, LLVMLinux: Enable clang to be used for unwinding the stack
authorMark Charlebois <charlebm@gmail.com>
Wed, 12 Feb 2014 03:26:08 +0000 (19:26 -0800)
committerBehan Webster <behanw@converseincode.com>
Sat, 7 Jun 2014 18:44:39 +0000 (11:44 -0700)
Patch to prevent warning of a buggy compiler when using clang and
the ARM_UNWIND option.

Clang defines (at least on the current trunk) GNUC, GNUC_MINOR, and
GNUC_PATCHLEVEL to 4, 2, and 1 respectively.

This version of GCC gets flagged as buggy, but it isn't actually an
issue with clang so the patch will do what it did before unless clang
is defined and then it will not report the GCC version as an issue.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
arch/arm/kernel/unwind.c

index cb791ac6a0037dfd392622eb5adf24467bcedc37..e67682f02cb2772920d693f41329f7e76e631ac5 100644 (file)
@@ -31,7 +31,7 @@
 #warning Your compiler does not have EABI support.
 #warning    ARM unwind is known to compile only with EABI compilers.
 #warning    Change compiler or disable ARM_UNWIND option.
-#elif (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)
+#elif (__GNUC__ == 4 && __GNUC_MINOR__ <= 2) && !defined(__clang__)
 #warning Your compiler is too buggy; it is known to not compile ARM unwind support.
 #warning    Change compiler or disable ARM_UNWIND option.
 #endif