linux/Documentation/process
Nathan Chancellor ce3267a39a
kbuild: Bump minimum version of LLVM for building the kernel to 17.0.1
The current minimum version of LLVM for building the kernel is 15.0.0.
However, there are two deficiencies compared to GCC that were fixed in
LLVM 17 that are starting to become more noticeable.

The first was a bug in LLVM's scope checker [1], where all labels in a
function were validated as potential targets of an asm goto statement,
even if they were not listed in the asm goto statement as targets. This
becomes particularly problematic when the cleanup attribute is used, as

  asm goto(... : label_a);
  ...
label_a:
  ...
  int var __free(foo);
  asm goto(... : label_b);
  ...
label_b:
  ...

will trigger an error since the scope checker will complain that the
cleanup variable would be skipped when jumping from the first asm goto
to label_b (which obviously cannot happen). This issue was the catalyst
for commit e2ffa15b9b ("kbuild: Disable CC_HAS_ASM_GOTO_OUTPUT on
clang < 17"). Unfortunately, this issue is reproducible with regular asm
goto in addition to asm goto with outputs, so that change was not
entirely sufficient to avoid the issue altogether. As asm goto has
effectively been required since commit a0a12c3ed0 ("asm goto:
eradicate CC_HAS_ASM_GOTO") and the usage of the cleanup attribute
continues to grow across the tree, raising the minimum to a version that
avoids this issue altogether is a better long term solution than
attempting to workaround it at every spot where it happens.

The second issue is an incompatibility with GCC 8.1+ around variables
marked with const being valid constant expressions for _Static_assert
and other macros [2]. With GCC 8.1 being the minimum supported version
since commit 118c40b7b5 ("kbuild: require gcc-8 and binutils-2.30"),
this incompatibility becomes more of a maintenance burden since only
clang-15 and clang-16 are affected by it.

Looking at the clang version of various major distributions through
Docker images, no one should be left behind as a result of this bump, as
the old ones cannot clear the current minimum of 15.0.0.

  archlinux:latest              clang version 22.1.3
  debian:oldoldstable-slim      Debian clang version 11.0.1-2
  debian:oldstable-slim         Debian clang version 14.0.6
  debian:stable-slim            Debian clang version 19.1.7 (3+b1)
  debian:testing-slim           Debian clang version 21.1.8 (3+b1)
  debian:unstable-slim          Debian clang version 21.1.8 (7+b1)
  fedora:42                     clang version 20.1.8 (Fedora 20.1.8-4.fc42)
  fedora:latest                 clang version 21.1.8 (Fedora 21.1.8-4.fc43)
  fedora:44                     clang version 22.1.1 (Fedora 22.1.1-2.fc44)
  fedora:rawhide                clang version 22.1.3 (Fedora 22.1.3-1.fc45)
  opensuse/leap:latest          clang version 17.0.6
  opensuse/tumbleweed:latest    clang version 21.1.8
  ubuntu:jammy                  Ubuntu clang version 14.0.0-1ubuntu1.1
  ubuntu:noble                  Ubuntu clang version 18.1.3 (1ubuntu1)
  ubuntu:questing               Ubuntu clang version 20.1.8 (0ubuntu4)
  ubuntu:resolute               Ubuntu clang version 21.1.8 (6ubuntu1)

17.0.1 is chosen as the minimum instead of 17.0.0 to ensure that the
particular version of LLVM 17 has the two aforementioned bugs fixed, as
the second was fixed during the 17.0.0 release candidate phase and it
was not until LLVM 18 that LLVM adopted the scheme of x.0.0 being a
prerelease version and x.1.0 is a release version [3] to help with
scenarios such as this.

Link: f023f5cdb2 [1]
Link: 0b2d5b967d [2]
Link: 4532617ae4 [3]
Acked-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20260517-bump-minimum-supported-llvm-version-to-17-v2-1-b3b8cda46bdd@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
2026-05-27 15:18:53 -07:00
..
debugging Documentation: Provide hints on how to debug Python GDB scripts 2026-03-30 10:04:13 -06:00
1.Intro.rst Doc: correct spelling and wording mistakes 2026-01-06 14:39:58 -07:00
2.Process.rst linux-next: update maintainer info. 2026-02-23 14:36:11 -07:00
3.Early-stage.rst Documentation/process: use scripts/get_maintainer.pl on patches 2022-05-09 16:12:16 -06:00
4.Coding.rst Doc: correct spelling and wording mistakes 2026-01-06 14:39:58 -07:00
5.Posting.rst doc: development-process: add notice on testing 2026-02-02 10:02:05 -07:00
6.Followthrough.rst docs: remove the tips on how to submit patches from MAINTAINERS 2023-07-03 08:35:23 -06:00
7.AdvancedTopics.rst Doc: correct spelling and wording mistakes 2026-01-06 14:39:58 -07:00
8.Conclusion.rst docs: process: remove outdated submitting-drivers.rst 2022-07-14 15:03:57 -06:00
adding-syscalls.rst docs: fix 're-use' -> 'reuse' in documentation 2026-02-02 09:54:15 -07:00
applying-patches.rst Documentation: describe how to apply incremental stable patches 2022-03-09 16:29:44 -07:00
backporting.rst Documentation: process: backporting: fix missing subject 2026-03-03 10:24:17 -07:00
botching-up-ioctls.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
changes.rst kbuild: Bump minimum version of LLVM for building the kernel to 17.0.1 2026-05-27 15:18:53 -07:00
code-of-conduct-interpretation.rst Documentation/CoC: Spell out the TAB role in enforcement decisions 2025-03-12 16:31:48 -06:00
code-of-conduct.rst
coding-assistants.rst docs: add AI Coding Assistants documentation 2026-01-06 14:55:06 -07:00
coding-style.rst docs: kdoc: move kernel-doc to tools/docs 2026-01-20 15:31:06 -07:00
conclave.rst Documentation: Project continuity 2026-01-24 16:16:47 -08:00
contribution-maturity-model.rst Documentation/process: Add Linux Kernel Contribution Maturity Model 2023-03-14 12:22:59 -06:00
cve.rst Documentation: Document the Linux Kernel CVE process 2024-02-17 14:46:39 +01:00
deprecated.rst slab: Introduce kmalloc_flex() and family 2026-01-14 14:43:01 -08:00
development-process.rst docs: use toctree :caption: and move introduction 2023-11-17 13:05:26 -07:00
email-clients.rst docs: process: email-client: add Thunderbird "Toggle Line Wrap" extension 2026-01-06 14:38:28 -07:00
embargoed-hardware-issues.rst Documentation: embargoed-hardware-issues.rst: Add myself for Power 2025-06-18 16:38:50 +02:00
generated-content.rst Documentation: Provide guidelines for tool-generated content 2026-01-20 14:51:22 -07:00
handling-regressions.rst docs: handling-regressions: add, trim, and sort quotes from Linus 2026-03-03 11:11:01 -07:00
howto.rst Documentation: fix links to mailing list services 2024-07-03 16:52:54 -06:00
index.rst A slightly calmer cycle for docs this time around, though there is still a 2026-02-09 20:53:18 -08:00
kernel-docs.rst kernel-docs: Add book to process/kernel-docs.rst 2025-02-18 13:24:01 -07:00
kernel-driver-statement.rst
kernel-enforcement-statement.rst
license-rules.rst LICENSES: Explicitly allow SPDX-FileCopyrightText 2026-03-20 11:42:50 +01:00
maintainer-handbooks.rst docs: remove unneeded maintainer_handbooks_main label 2026-02-26 15:12:08 -07:00
maintainer-kvm-x86.rst Documentation/process: Add a maintainer handbook for KVM x86 2023-06-22 14:25:38 -07:00
maintainer-netdev.rst docs: maintainer-netdev: fix typo in "targeting" 2026-04-22 20:16:58 -07:00
maintainer-pgp-guide.rst docs: maintainer-pgp-guide.rst: add a reference for kernel.org sign 2026-02-27 06:34:06 +01:00
maintainer-soc-clean-dts.rst docs: process: maintainer-soc-clean-dts: linux-next is decisive 2025-02-26 13:15:57 -06:00
maintainer-soc.rst Documentation/process: maintainer-soc: Document purpose of defconfigs 2026-04-20 17:03:53 +02:00
maintainer-tip.rst Documentation/maintainer-tip: Fix grammar 2026-03-03 09:59:23 -07:00
maintainers.rst
management-style.rst
programming-language.rst A handful of small, late-arriving documentation fixes. 2026-02-15 10:47:59 -08:00
researcher-guidelines.rst Documentation: update mailing list addresses 2024-02-21 13:44:21 -07:00
security-bugs.rst Documentation: fix two typos in latest update to the security report howto 2026-04-04 10:38:43 +02:00
stable-api-nonsense.rst
stable-kernel-rules.rst docs: stable-kernel-rules: fix typo sent->send 2024-05-02 10:20:27 -06:00
submit-checklist.rst docs/.../submit-checklist: Use Documentation/admin-guide/abi.rst for cross-ref of README 2025-03-12 16:41:56 -06:00
submitting-patches.rst docs: add an Assisted-by mention to submitting-patches.rst 2026-04-07 07:45:27 -06:00
volatile-considered-harmful.rst