Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge patch series "Bump minimum supported version of LLVM for building the kernel to 15.0.0"

s390 and x86 have required LLVM 15 since

30d17fac6aae ("scripts/min-tool-version.sh: raise minimum clang version to 15.0.0 for s390")
7861640aac52 ("x86/build: Raise the minimum LLVM version to 15.0.0")

respectively. This series bumps the rest of the kernel to 15.0.0 to
match, which allows for a decent number of clean ups.

On the distros front, we will only leave behind Debian Bookworm and
Ubuntu Jammy. In both of those cases, builders / developers can either
use the kernel.org toolchains or https://apt.llvm.org to get newer
versions that will run on those distributions, if they cannot upgrade.

archlinux:latest clang version 20.1.8
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 19.1.7 (3+b1)
debian:unstable-slim Debian clang version 19.1.7 (3+b2)
fedora:41 clang version 19.1.7 (Fedora 19.1.7-4.fc41)
fedora:latest clang version 20.1.8 (Fedora 20.1.8-3.fc42)
fedora:rawhide clang version 20.1.8 (Fedora 20.1.8-3.fc43)
opensuse/leap:latest clang version 17.0.6
opensuse/tumbleweed:latest clang version 20.1.8
ubuntu:focal clang version 10.0.0-4ubuntu1
ubuntu:jammy Ubuntu clang version 14.0.0-1ubuntu1.1
ubuntu:noble Ubuntu clang version 18.1.3 (1ubuntu1)
ubuntu:latest Ubuntu clang version 18.1.3 (1ubuntu1)
ubuntu:rolling Ubuntu clang version 20.1.2 (0ubuntu1)
ubuntu:devel Ubuntu clang version 20.1.8 (0ubuntu1)

Link: https://lore.kernel.org/r/20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

+19 -71
+1 -1
Documentation/process/changes.rst
··· 30 30 Program Minimal version Command to check the version 31 31 ====================== =============== ======================================== 32 32 GNU C 8.1 gcc --version 33 - Clang/LLVM (optional) 13.0.1 clang --version 33 + Clang/LLVM (optional) 15.0.0 clang --version 34 34 Rust (optional) 1.78.0 rustc --version 35 35 bindgen (optional) 0.65.1 bindgen --version 36 36 GNU make 4.0 make --version
-1
arch/Kconfig
··· 1475 1475 bool "Support for randomizing kernel stack offset on syscall entry" if EXPERT 1476 1476 default y 1477 1477 depends on HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 1478 - depends on INIT_STACK_NONE || !CC_IS_CLANG || CLANG_VERSION >= 140000 1479 1478 help 1480 1479 The kernel stack offset can be randomized (after pt_regs) by 1481 1480 roughly 5 bits of entropy, frustrating memory corruption
+4 -7
arch/arm/Kconfig
··· 166 166 <http://www.arm.linux.org.uk/>. 167 167 168 168 config ARM_HAS_GROUP_RELOCS 169 - def_bool y 170 - depends on !LD_IS_LLD || LLD_VERSION >= 140000 171 - depends on !COMPILE_TEST 169 + def_bool !COMPILE_TEST 172 170 help 173 171 Whether or not to use R_ARM_ALU_PC_Gn or R_ARM_LDR_PC_Gn group 174 - relocations, which have been around for a long time, but were not 175 - supported in LLD until version 14. The combined range is -/+ 256 MiB, 176 - which is usually sufficient, but not for allyesconfig, so we disable 177 - this feature when doing compile testing. 172 + relocations. The combined range is -/+ 256 MiB, which is usually 173 + sufficient, but not for allyesconfig, so we disable this feature 174 + when doing compile testing. 178 175 179 176 config ARM_DMA_USE_IOMMU 180 177 bool
+1 -4
arch/arm64/Kconfig
··· 1492 1492 1493 1493 config CPU_BIG_ENDIAN 1494 1494 bool "Build big-endian kernel" 1495 - # https://github.com/llvm/llvm-project/commit/1379b150991f70a5782e9a143c2ba5308da1161c 1496 - depends on AS_IS_GNU || AS_VERSION >= 150000 1497 1495 help 1498 1496 Say Y if you plan on running a kernel with a big-endian userspace. 1499 1497 ··· 2361 2363 2362 2364 config UNWIND_PATCH_PAC_INTO_SCS 2363 2365 bool "Enable shadow call stack dynamically using code patching" 2364 - # needs Clang with https://github.com/llvm/llvm-project/commit/de07cde67b5d205d58690be012106022aea6d2b3 incorporated 2365 - depends on CC_IS_CLANG && CLANG_VERSION >= 150000 2366 + depends on CC_IS_CLANG 2366 2367 depends on ARM64_PTR_AUTH_KERNEL && CC_HAS_BRANCH_PROT_PAC_RET 2367 2368 depends on SHADOW_CALL_STACK 2368 2369 select UNWIND_TABLES
+1 -1
arch/mips/Kconfig
··· 6 6 select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT 7 7 select ARCH_HAS_CPU_CACHE_ALIASING 8 8 select ARCH_HAS_CPU_FINALIZE_INIT 9 - select ARCH_HAS_CURRENT_STACK_POINTER if !CC_IS_CLANG || CLANG_VERSION >= 140000 9 + select ARCH_HAS_CURRENT_STACK_POINTER 10 10 select ARCH_HAS_DEBUG_VIRTUAL if !64BIT 11 11 select ARCH_HAS_DMA_OPS if MACH_JAZZ 12 12 select ARCH_HAS_FORTIFY_SOURCE
-4
arch/powerpc/include/asm/inst.h
··· 143 143 { 144 144 unsigned int val, suffix; 145 145 146 - /* See https://github.com/ClangBuiltLinux/linux/issues/1521 */ 147 - #if defined(CONFIG_CC_IS_CLANG) && CONFIG_CLANG_VERSION < 140000 148 - val = suffix = 0; 149 - #endif 150 146 __get_kernel_nofault(&val, src, u32, Efault); 151 147 if (IS_ENABLED(CONFIG_PPC64) && get_op(val) == OP_PREFIX) { 152 148 __get_kernel_nofault(&suffix, src + 1, u32, Efault);
+7 -14
arch/riscv/Kconfig
··· 64 64 select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU 65 65 select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE 66 66 select ARCH_SUPPORTS_HUGETLBFS if MMU 67 - # LLD >= 14: https://github.com/llvm/llvm-project/issues/50505 68 - select ARCH_SUPPORTS_LTO_CLANG if LLD_VERSION >= 140000 69 - select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >= 140000 67 + select ARCH_SUPPORTS_LTO_CLANG 68 + select ARCH_SUPPORTS_LTO_CLANG_THIN 70 69 select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS if 64BIT && MMU 71 70 select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU 72 71 select ARCH_SUPPORTS_PER_VMA_LOCK if MMU ··· 246 247 # https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/a484e843e6eeb51f0cb7b8819e50da6d2444d769 247 248 depends on $(ld-option,--no-relax-gp) 248 249 249 - config RISCV_USE_LINKER_RELAXATION 250 - def_bool y 251 - # https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985 252 - depends on !LD_IS_LLD || LLD_VERSION >= 150000 253 - 254 250 # https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 255 251 config ARCH_HAS_BROKEN_DWARF5 256 252 def_bool y 257 - depends on RISCV_USE_LINKER_RELAXATION 258 253 # https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a 259 254 depends on AS_IS_LLVM && AS_VERSION < 180000 260 255 # https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77 ··· 620 627 default y 621 628 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64imv) 622 629 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32imv) 623 - depends on LLD_VERSION >= 140000 || LD_VERSION >= 23800 630 + depends on LD_IS_LLD || LD_VERSION >= 23800 624 631 depends on AS_HAS_OPTION_ARCH 625 632 626 633 config RISCV_ISA_V ··· 721 728 default y 722 729 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb) 723 730 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb) 724 - depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900 731 + depends on LD_IS_LLD || LD_VERSION >= 23900 725 732 depends on AS_HAS_OPTION_ARCH 726 733 727 734 # This symbol indicates that the toolchain supports all v1.0 vector crypto ··· 736 743 default y 737 744 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zba) 738 745 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zba) 739 - depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900 746 + depends on LD_IS_LLD || LD_VERSION >= 23900 740 747 depends on AS_HAS_OPTION_ARCH 741 748 742 749 config RISCV_ISA_ZBA ··· 771 778 default y 772 779 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbc) 773 780 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbc) 774 - depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900 781 + depends on LD_IS_LLD || LD_VERSION >= 23900 775 782 depends on AS_HAS_OPTION_ARCH 776 783 777 784 config RISCV_ISA_ZBC ··· 794 801 default y 795 802 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbkb) 796 803 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbkb) 797 - depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900 804 + depends on LD_IS_LLD || LD_VERSION >= 23900 798 805 depends on AS_HAS_OPTION_ARCH 799 806 800 807 config RISCV_ISA_ZBKB
+1 -8
arch/riscv/Makefile
··· 46 46 KBUILD_LDFLAGS += -melf32lriscv 47 47 endif 48 48 49 - ifndef CONFIG_RISCV_USE_LINKER_RELAXATION 50 - KBUILD_CFLAGS += -mno-relax 51 - KBUILD_AFLAGS += -mno-relax 52 - ifndef CONFIG_AS_IS_LLVM 53 - KBUILD_CFLAGS += -Wa,-mno-relax 54 - KBUILD_AFLAGS += -Wa,-mno-relax 55 - endif 56 49 # LLVM has an issue with target-features and LTO: https://github.com/llvm/llvm-project/issues/59350 57 50 # Ensure it is aware of linker relaxation with LTO, otherwise relocations may 58 51 # be incorrect: https://github.com/llvm/llvm-project/issues/65090 59 - else ifeq ($(CONFIG_LTO_CLANG),y) 52 + ifeq ($(CONFIG_LTO_CLANG),y) 60 53 KBUILD_LDFLAGS += -mllvm -mattr=+c -mllvm -mattr=+relax 61 54 endif 62 55
+1 -1
lib/Kconfig.debug
··· 259 259 config DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT 260 260 bool "Rely on the toolchain's implicit default DWARF version" 261 261 select DEBUG_INFO 262 - depends on !CC_IS_CLANG || AS_IS_LLVM || CLANG_VERSION < 140000 || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_ULEB128) 262 + depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_ULEB128) 263 263 help 264 264 The implicit default version of DWARF debug info produced by a 265 265 toolchain changes over time.
-6
lib/Kconfig.kcsan
··· 185 185 bool "Enable weak memory modeling to detect missing memory barriers" 186 186 default y 187 187 depends on KCSAN_STRICT 188 - # We can either let objtool nop __tsan_func_{entry,exit}() and builtin 189 - # atomics instrumentation in .noinstr.text, or use a compiler that can 190 - # implement __no_kcsan to really remove all instrumentation. 191 - depends on !ARCH_WANTS_NO_INSTR || HAVE_NOINSTR_HACK || \ 192 - CC_IS_GCC || CLANG_VERSION >= 140000 193 - select OBJTOOL if HAVE_NOINSTR_HACK 194 188 help 195 189 Enable support for modeling a subset of weak memory, which allows 196 190 detecting a subset of data races due to missing memory barriers.
+1 -10
lib/Kconfig.kmsan
··· 3 3 bool 4 4 5 5 config HAVE_KMSAN_COMPILER 6 - # Clang versions <14.0.0 also support -fsanitize=kernel-memory, but not 7 - # all the features necessary to build the kernel with KMSAN. 8 - depends on CC_IS_CLANG && CLANG_VERSION >= 140000 9 - def_bool $(cc-option,-fsanitize=kernel-memory -mllvm -msan-disable-checks=1) 6 + def_bool CC_IS_CLANG 10 7 11 8 config KMSAN 12 9 bool "KMSAN: detector of uninitialized values use" ··· 25 28 26 29 if KMSAN 27 30 28 - config HAVE_KMSAN_PARAM_RETVAL 29 - # -fsanitize-memory-param-retval is supported only by Clang >= 14. 30 - depends on HAVE_KMSAN_COMPILER 31 - def_bool $(cc-option,-fsanitize=kernel-memory -fsanitize-memory-param-retval) 32 - 33 31 config KMSAN_CHECK_PARAM_RETVAL 34 32 bool "Check for uninitialized values passed to and returned from functions" 35 33 default y 36 - depends on HAVE_KMSAN_PARAM_RETVAL 37 34 help 38 35 If the compiler supports -fsanitize-memory-param-retval, KMSAN will 39 36 eagerly check every function parameter passed by value and every
+2 -4
scripts/min-tool-version.sh
··· 24 24 fi 25 25 ;; 26 26 llvm) 27 - if [ "$SRCARCH" = s390 -o "$SRCARCH" = x86 ]; then 28 - echo 15.0.0 29 - elif [ "$SRCARCH" = loongarch ]; then 27 + if [ "$SRCARCH" = loongarch ]; then 30 28 echo 18.0.0 31 29 else 32 - echo 13.0.1 30 + echo 15.0.0 33 31 fi 34 32 ;; 35 33 rustc)
-10
tools/objtool/check.c
··· 2453 2453 if (!strncmp(name, "__sanitizer_cov_", 16)) 2454 2454 return true; 2455 2455 2456 - /* 2457 - * Some compilers currently do not remove __tsan_func_entry/exit nor 2458 - * __tsan_atomic_signal_fence (used for barrier instrumentation) with 2459 - * the __no_sanitize_thread attribute, remove them. Once the kernel's 2460 - * minimum Clang version is 14.0, this can be removed. 2461 - */ 2462 - if (!strncmp(name, "__tsan_func_", 12) || 2463 - !strcmp(name, "__tsan_atomic_signal_fence")) 2464 - return true; 2465 - 2466 2456 return false; 2467 2457 } 2468 2458