summaryrefslogtreecommitdiffstats
path: root/include/linux/compiler-gcc3.h
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-09-04 02:40:58 +0900
committerTom Rini <trini@ti.com>2014-09-16 12:23:57 -0400
commitfb8ffd7cfc68b3dc44e182356a207d784cb30b34 (patch)
treebe23db4db6ee7ea999d5198c38391d0e0393cf30 /include/linux/compiler-gcc3.h
parente6ca1ad604419619e2e6ba16a6e43cf15ff07fb1 (diff)
downloadblackbird-obmc-uboot-fb8ffd7cfc68b3dc44e182356a207d784cb30b34.tar.gz
blackbird-obmc-uboot-fb8ffd7cfc68b3dc44e182356a207d784cb30b34.zip
compiler*.h: sync include/linux/compiler*.h with Linux 3.16
Copy them from Linux v3.16 tag. My main motivation of this commit is to add compiler-clang.h. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Diffstat (limited to 'include/linux/compiler-gcc3.h')
-rw-r--r--include/linux/compiler-gcc3.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h
index 2befe6513c..7d89febe4d 100644
--- a/include/linux/compiler-gcc3.h
+++ b/include/linux/compiler-gcc3.h
@@ -2,20 +2,22 @@
#error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead."
#endif
-#if __GNUC_MINOR__ >= 3
+#if GCC_VERSION < 30200
+# error Sorry, your compiler is too old - please upgrade it.
+#endif
+
+#if GCC_VERSION >= 30300
# define __used __attribute__((__used__))
#else
# define __used __attribute__((__unused__))
#endif
-#if __GNUC_MINOR__ >= 4
+#if GCC_VERSION >= 30400
#define __must_check __attribute__((warn_unused_result))
#endif
-/*
- * A trick to suppress uninitialized variable warning without generating any
- * code
- */
-#define uninitialized_var(x) x = x
-
-#define __always_inline inline __attribute__((always_inline))
+#ifdef CONFIG_GCOV_KERNEL
+# if GCC_VERSION < 30400
+# error "GCOV profiling support for gcc versions below 3.4 not included"
+# endif /* __GNUC_MINOR__ */
+#endif /* CONFIG_GCOV_KERNEL */
OpenPOWER on IntegriCloud