]> git.baikalelectronics.ru Git - kernel.git/commit
Raise gcc version requirement to 4.9
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Jul 2020 17:48:35 +0000 (10:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Jul 2020 17:48:35 +0000 (10:48 -0700)
commit79fe9a4d18244a73ea31d89d03a9991c8d445229
treea73eea98a918b03ee9893a325d6e30d75c64e800
parent50664c5231f5cada1d7fe1d1516c68f4d1756486
Raise gcc version requirement to 4.9

I realize that we fairly recently raised it to 4.8, but the fact is, 4.9
is a much better minimum version to target.

We have a number of workarounds for actual bugs in pre-4.9 gcc versions
(including things like internal compiler errors on ARM), but we also
have some syntactic workarounds for lacking features.

In particular, raising the minimum to 4.9 means that we can now just
assume _Generic() exists, which is likely the much better replacement
for a lot of very convoluted built-time magic with conditionals on
sizeof and/or __builtin_choose_expr() with same_type() etc.

Using _Generic also means that you will need to have a very recent
version of 'sparse', but thats easy to build yourself, and much less of
a hassle than some old gcc version can be.

The latest (in a long string) of reasons for minimum compiler version
upgrades was commit 9c48eef5c547 ("efi/x86: Fix build with gcc 4").

Ard points out that RHEL 7 uses gcc-4.8, but the people who stay back on
old RHEL versions persumably also don't build their own kernels anyway.
And maybe they should cross-built or just have a little side affair with
a newer compiler?

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/arm/kernel/asm-offsets.c
arch/mips/include/asm/unroll.h
include/linux/bits.h
include/linux/compiler-gcc.h
include/linux/compiler_types.h
mm/migrate.c
tools/include/linux/bits.h