LLVMLinux: Don't use attribute externally_visible when building with clang
authorBernhard Rosenkränzer <bero@linaro.org>
Wed, 22 Feb 2017 23:45:31 +0000 (00:45 +0100)
committerStefan Agner <stefan@agner.ch>
Mon, 7 Aug 2017 06:21:11 +0000 (23:21 -0700)
As of 4.0, clang doesn't support attribute externally_visible (PR16683).
Don't use the attribute when building with clang.

Signed-off-by: Bernhard Rosenkränzer <bero@linaro.org>
include/linux/compiler-gcc.h

index fe2ae9b526cf98ed5b225140db6ba675388b8045..50a694506fe5c35520dee5f910a2cec91bca8799 100644 (file)
 
 #endif /* GCC_VERSION >= 40500 */
 
-#if GCC_VERSION >= 40600
-
+#if GCC_VERSION >= 40600 && !defined(__clang__)
 /*
  * When used with Link Time Optimization, gcc can optimize away C functions or
  * variables which are referenced only from assembly code.  __visible tells the