Commit 118c40b7 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

kbuild: require gcc-8 and binutils-2.30

Commit a3e8fe81 ("x86/build: Raise the minimum GCC version to 8.1")
raised the minimum compiler version as enforced by Kbuild to gcc-8.1
and clang-15 for x86.

This is actually the same gcc version that has been discussed as the
minimum for all architectures several times in the past, with little
objection. A previous concern was the kernel for SLE15-SP7 needing to
be built with gcc-7. As this ended up still using linux-6.4 and there
is no plan for an SP8, this is no longer a problem.

Change it for all architectures and adjust the documentation accordingly.
A few version checks can be removed in the process.  The binutils
version 2.30 is the lowest version used in combination with gcc-8 on
common distros, so use that as the corresponding minimum.

Link: https://lore.kernel.org/lkml/20240925150059.3955569-32-ardb+git@google.com/
Link: https://lore.kernel.org/lkml/871q7yxrgv.wl-tiwai@suse.de/


Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent b4432656
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -259,7 +259,7 @@ Configuring the kernel
Compiling the kernel
--------------------

 - Make sure you have at least gcc 5.1 available.
 - Make sure you have at least gcc 8.1 available.
   For more information, refer to :ref:`Documentation/process/changes.rst <changes>`.

 - Do a ``make`` to create a compressed kernel image. It is also possible to do
+2 −2
Original line number Diff line number Diff line
@@ -625,10 +625,10 @@ gcc-min-version

  Example::

    cflags-$(call gcc-min-version, 70100) := -foo
    cflags-$(call gcc-min-version, 110100) := -foo

  In this example, cflags-y will be assigned the value -foo if $(CC) is gcc and
  $(CONFIG_GCC_VERSION) is >= 7.1.
  $(CONFIG_GCC_VERSION) is >= 11.1.

clang-min-version
  clang-min-version tests if the value of $(CONFIG_CLANG_VERSION) is greater
+2 −2
Original line number Diff line number Diff line
@@ -29,13 +29,13 @@ you probably needn't concern yourself with pcmciautils.
====================== ===============  ========================================
        Program        Minimal version       Command to check the version
====================== ===============  ========================================
GNU C                  5.1              gcc --version
GNU C                  8.1              gcc --version
Clang/LLVM (optional)  13.0.1           clang --version
Rust (optional)        1.78.0           rustc --version
bindgen (optional)     0.65.1           bindgen --version
GNU make               4.0              make --version
bash                   4.2              bash --version
binutils               2.25             ld -v
binutils               2.30             ld -v
flex                   2.5.35           flex --version
bison                  2.0              bison --version
pahole                 1.16             pahole --version
+2 −2
Original line number Diff line number Diff line
@@ -32,13 +32,13 @@ PC Card, per esempio, probabilmente non dovreste preoccuparvi di pcmciautils.
====================== =================  ========================================
        Programma       Versione minima       Comando per verificare la versione
====================== =================  ========================================
GNU C                  5.1                gcc --version
GNU C                  8.1                gcc --version
Clang/LLVM (optional)  13.0.0             clang --version
Rust (opzionale)       1.78.0             rustc --version
bindgen (opzionale)    0.65.1             bindgen --version
GNU make               4.0                make --version
bash                   4.2                bash --version
binutils               2.25               ld -v
binutils               2.30               ld -v
flex                   2.5.35             flex --version
bison                  2.0                bison --version
pahole                 1.16               pahole --version
+1 −1
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ Linux内核6.x版本 <http://kernel.org/>
编译内核
---------

 - 确保您至少有gcc 5.1可用。
 - 确保您至少有gcc 8.1可用。
   有关更多信息,请参阅 :ref:`Documentation/process/changes.rst <changes>` 。

 - 执行 ``make`` 来创建压缩内核映像。如果您安装了lilo以适配内核makefile,
Loading