History

compiler/gcc: Raise minimum GCC version for kernel builds to 4.8

It is very rare to see versions of GCC prior to 4.8 being used to build the mainline kernel. These old compilers are also know to have codegen issues which can lead to silent miscompilation: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 Raise the minimum GCC version for kernel build to 4.8 and remove some tautological Kconfig dependencies as a consequence.

Will Deacon committed 6 years ago

Commit 5429ef61 parent 8f3d9f36 files · +10 −13Browse files

Showing the changes to include/linux (1 of 6 files). Show all

Unified · Split

include/linux/compiler-gcc.h+2−3
@@ -10,7 +10,8 @@ · 9 unmodified lines
10 + __GNUC_MINOR__ * 100 \10 + __GNUC_MINOR__ * 100 \
11 + __GNUC_PATCHLEVEL__)11 + __GNUC_PATCHLEVEL__)
12 12
13#if GCC_VERSION < 4060013/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 */
14#if GCC_VERSION < 40800
14# error Sorry, your compiler is too old - please upgrade it.15# error Sorry, your compiler is too old - please upgrade it.
15#endif16#endif
16 17
@@ -126,9 +127,7 @@ · 109 unmodified lines
126#if defined(CONFIG_ARCH_USE_BUILTIN_BSWAP) && !defined(__CHECKER__)127#if defined(CONFIG_ARCH_USE_BUILTIN_BSWAP) && !defined(__CHECKER__)
127#define __HAVE_BUILTIN_BSWAP32__128#define __HAVE_BUILTIN_BSWAP32__
128#define __HAVE_BUILTIN_BSWAP64__129#define __HAVE_BUILTIN_BSWAP64__
129#if GCC_VERSION >= 40800
130#define __HAVE_BUILTIN_BSWAP16__130#define __HAVE_BUILTIN_BSWAP16__
131#endif
132#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP && !__CHECKER__ */131#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP && !__CHECKER__ */
133 132
134#if GCC_VERSION >= 70000133#if GCC_VERSION >= 70000