"entry_64.S" fails to compile with binutils 2.20.x (found in RHEL6 and all derivatives) with the following error:
> arch/x86/entry/entry_64.S:1025: Error: using shift_ist requires paranoid=1
I verified that backporting GAS 2.31 fixes this compilation failure (specifically, 220.127.116.11.2-5.48.el6_10.1 from CentOS 6 fails, and 2.31 works). GAS 2.20 and below require doubling ampersands in macros, but this check (introduced in 4234653e882740cbf6625eeee294e388b3176583) does not double ampersands. I am not aware of a way to perform a logical AND in a macro that works both with GAS 2.20- and GAS 2.21+.
The minimum binutils version needed to build the current kernel is 2.21:
I agree that that doc says 2.21, but mainline kernels for rhel/centos 6 have been compiled successfully with 2.20 up to 5.3, and I see there's still lots of compatibility code in the kernel for binutils down to 2.11. With the `&&` patched into `&&&&`, everything continues to compile and run just fine. I don't suppose there's any chance of maintaining upstream EL6-era-toolchain compatibility for a bit longer?
I just installed centos6 in a vm:
In file included from ././include/linux/compiler_types.h:68,
./include/linux/compiler-gcc.h:14:3: error: #error Sorry, your compiler is too old - please upgrade it.
So what you're reporting is not the only problem.
$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
Copyright (C) 2010 Free Software Foundation, Inc.