Nick Desaulniers 815f0ddb34 include/linux/compiler*.h: make compiler-*.h mutually exclusive
Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
recently exposed a brittle part of the build for supporting non-gcc
compilers.

Both Clang and ICC define __GNUC__, __GNUC_MINOR__, and
__GNUC_PATCHLEVEL__ for quick compatibility with code bases that haven't
added compiler specific checks for __clang__ or __INTEL_COMPILER.

This is brittle, as they happened to get compatibility by posing as a
certain version of GCC.  This broke when upgrading the minimal version
of GCC required to build the kernel, to a version above what ICC and
Clang claim to be.

Rather than always including compiler-gcc.h then undefining or
redefining macros in compiler-intel.h or compiler-clang.h, let's
separate out the compiler specific macro definitions into mutually
exclusive headers, do more proper compiler detection, and keep shared
definitions in compiler_types.h.

Fixes: cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Suggested-by: Eli Friedman <efriedma@codeaurora.org>
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-08-22 17:31:34 -07:00
..
2018-08-06 11:18:01 -07:00
2018-07-20 12:29:24 +10:00
2018-08-06 11:18:01 -07:00
2018-07-20 12:29:24 +10:00
2017-10-07 10:11:41 +01:00
2018-08-06 11:18:01 -07:00
2017-08-03 18:18:05 +01:00
2017-08-03 18:18:05 +01:00
2017-08-03 18:18:05 +01:00
2017-08-03 18:18:05 +01:00
2017-08-03 18:18:05 +01:00
2018-08-15 17:39:07 -07:00
2018-03-08 10:07:18 +00:00
2017-07-09 18:48:37 -07:00
2018-08-15 17:39:07 -07:00
2018-08-06 11:18:01 -07:00
2018-08-20 15:38:44 -07:00
2018-07-20 10:46:49 +10:00
2018-07-20 12:29:24 +10:00
2018-08-20 15:38:44 -07:00
2018-06-12 16:19:22 -07:00
2018-08-20 15:38:44 -07:00
2018-07-12 17:31:28 +02:00
2018-08-15 17:39:07 -07:00
2018-07-20 12:29:24 +10:00
2018-08-06 11:18:01 -07:00
2018-07-20 10:46:49 +10:00
2018-07-20 12:29:24 +10:00
2018-08-20 15:38:44 -07:00