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
1010 + __GNUC_MINOR__ * 100 \
1111 + __GNUC_PATCHLEVEL__)
1212
13−#if GCC_VERSION < 40600
13+/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 */
14+#if GCC_VERSION < 40800
1415 # error Sorry, your compiler is too old - please upgrade it.
1516 #endif
1617
@@ -126,9 +127,7 @@ · 109 unmodified lines
126127 #if defined(CONFIG_ARCH_USE_BUILTIN_BSWAP) && !defined(__CHECKER__)
127128 #define __HAVE_BUILTIN_BSWAP32__
128129 #define __HAVE_BUILTIN_BSWAP64__
129−#if GCC_VERSION >= 40800
130130 #define __HAVE_BUILTIN_BSWAP16__
131−#endif
132131 #endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP && !__CHECKER__ */
133132
134133 #if GCC_VERSION >= 70000