From: Mark Charlebois Date: Wed, 12 Feb 2014 03:26:08 +0000 (-0800) Subject: arm, unwind, LLVMLinux: Enable clang to be used for unwinding the stack X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e6b80757700a11315dd81b161f8d86099214c185;p=openwrt%2Fstaging%2Fblogic.git arm, unwind, LLVMLinux: Enable clang to be used for unwinding the stack 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 Signed-off-by: Behan Webster --- diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c index cb791ac6a003..e67682f02cb2 100644 --- a/arch/arm/kernel/unwind.c +++ b/arch/arm/kernel/unwind.c @@ -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