Bug 205103
Summary: | Kernel 5.3.x fails to compile with binutils 2.20 and below | ||
---|---|---|---|
Product: | Platform Specific/Hardware | Reporter: | James Brown (jbrown) |
Component: | x86-64 | Assignee: | platform_x86_64 (platform_x86_64) |
Status: | NEW --- | ||
Severity: | normal | CC: | bp |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.3.4 | Subsystem: | |
Regression: | No | Bisected commit-id: |
The minimum binutils version needed to build the current kernel is 2.21: https://www.kernel.org/doc/html/latest/process/changes.html 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, from <command-line>:0: ./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. |
"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, 2.20.51.0.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+.