* [PATCH v2 00/12] Bump minimum supported version of LLVM for building the kernel to 15.0.0
@ 2025-08-21 21:15 Nathan Chancellor
2025-08-21 21:15 ` [PATCH v2 07/12] riscv: Remove version check for LTO_CLANG selects Nathan Chancellor
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Nathan Chancellor @ 2025-08-21 21:15 UTC (permalink / raw)
To: linux-kernel
Cc: Arnd Bergmann, Kees Cook, Nick Desaulniers, Bill Wendling,
Justin Stitt, llvm, patches, Nicolas Schier, Nathan Chancellor,
linux-kbuild, linux-hardening, Russell King, Ard Biesheuvel,
linux-arm-kernel, Will Deacon, Thomas Bogendoerfer, linux-mips,
Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, linuxppc-dev, Palmer Dabbelt, Alexandre Ghiti,
linux-riscv, Marco Elver, Peter Zijlstra (Intel), kasan-dev
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)
I plan to carry this via the Kbuild tree with the appropriate acks.
---
Changes in v2:
- Add two new patches for RISC-V to clean up more LLD_VERSION checks
(Alex)
- Pick up provided tags (thanks all!)
- Link to v1: https://lore.kernel.org/r/20250818-bump-min-llvm-ver-15-v1-0-c8b1d0f955e0@kernel.org
---
Nathan Chancellor (12):
kbuild: Bump minimum version of LLVM for building the kernel to 15.0.0
arch/Kconfig: Drop always true condition from RANDOMIZE_KSTACK_OFFSET
ARM: Clean up definition of ARM_HAS_GROUP_RELOCS
arm64: Remove tautological LLVM Kconfig conditions
mips: Unconditionally select ARCH_HAS_CURRENT_STACK_POINTER
powerpc: Drop unnecessary initializations in __copy_inst_from_kernel_nofault()
riscv: Remove version check for LTO_CLANG selects
riscv: Unconditionally use linker relaxation
riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs
lib/Kconfig.debug: Drop CLANG_VERSION check from DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
objtool: Drop noinstr hack for KCSAN_WEAK_MEMORY
KMSAN: Remove tautological checks
Documentation/process/changes.rst | 2 +-
arch/Kconfig | 1 -
arch/arm/Kconfig | 11 ++++-------
arch/arm64/Kconfig | 5 +----
arch/mips/Kconfig | 2 +-
arch/powerpc/include/asm/inst.h | 4 ----
arch/riscv/Kconfig | 21 +++++++--------------
arch/riscv/Makefile | 9 +--------
lib/Kconfig.debug | 2 +-
lib/Kconfig.kcsan | 6 ------
lib/Kconfig.kmsan | 11 +----------
scripts/min-tool-version.sh | 6 ++----
tools/objtool/check.c | 10 ----------
13 files changed, 19 insertions(+), 71 deletions(-)
---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250710-bump-min-llvm-ver-15-95231f1eb655
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 07/12] riscv: Remove version check for LTO_CLANG selects
2025-08-21 21:15 [PATCH v2 00/12] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
@ 2025-08-21 21:15 ` Nathan Chancellor
2025-08-22 12:31 ` Alexandre Ghiti
2025-08-27 17:31 ` Conor Dooley
2025-08-21 21:15 ` [PATCH v2 08/12] riscv: Unconditionally use linker relaxation Nathan Chancellor
` (2 subsequent siblings)
3 siblings, 2 replies; 10+ messages in thread
From: Nathan Chancellor @ 2025-08-21 21:15 UTC (permalink / raw)
To: linux-kernel
Cc: Arnd Bergmann, Kees Cook, Nick Desaulniers, Bill Wendling,
Justin Stitt, llvm, patches, Nathan Chancellor, Palmer Dabbelt,
Alexandre Ghiti, linux-riscv
Now that the minimum supported version of LLVM for building the kernel
has been bumped to 15.0.0, there is no need to check the LLD version
before selecting ARCH_SUPPORTS_LTO_CLANG{,_THIN} because it will always
be true.
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: linux-riscv@lists.infradead.org
Small note, this will conflict with
https://lore.kernel.org/20250710-riscv-restrict-lto-to-medany-v1-1-b1dac9871ecf@kernel.org/
but I think it is simple enough to deal with.
---
arch/riscv/Kconfig | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index a4b233a0659e..1d53bf02d0fa 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -64,9 +64,8 @@ config RISCV
select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE
select ARCH_SUPPORTS_HUGETLBFS if MMU
- # LLD >= 14: https://github.com/llvm/llvm-project/issues/50505
- select ARCH_SUPPORTS_LTO_CLANG if LLD_VERSION >= 140000
- select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >= 140000
+ select ARCH_SUPPORTS_LTO_CLANG
+ select ARCH_SUPPORTS_LTO_CLANG_THIN
select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS if 64BIT && MMU
select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
--
2.50.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 08/12] riscv: Unconditionally use linker relaxation
2025-08-21 21:15 [PATCH v2 00/12] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
2025-08-21 21:15 ` [PATCH v2 07/12] riscv: Remove version check for LTO_CLANG selects Nathan Chancellor
@ 2025-08-21 21:15 ` Nathan Chancellor
2025-08-22 12:35 ` Alexandre Ghiti
2025-08-21 21:15 ` [PATCH v2 09/12] riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs Nathan Chancellor
2025-08-29 22:33 ` [PATCH v2 00/12] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
3 siblings, 1 reply; 10+ messages in thread
From: Nathan Chancellor @ 2025-08-21 21:15 UTC (permalink / raw)
To: linux-kernel
Cc: Arnd Bergmann, Kees Cook, Nick Desaulniers, Bill Wendling,
Justin Stitt, llvm, patches, Nathan Chancellor, Palmer Dabbelt,
Alexandre Ghiti, linux-riscv
Now that the minimum supported version of LLVM for building the kernel
has been bumped to 15.0.0, CONFIG_RISCV_USE_LINKER_RELAXATION will
always be enabled, so it can be removed.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: linux-riscv@lists.infradead.org
---
arch/riscv/Kconfig | 6 ------
arch/riscv/Makefile | 9 +--------
2 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 1d53bf02d0fa..d482236e93f4 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -246,15 +246,9 @@ config HAVE_SHADOW_CALL_STACK
# https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/a484e843e6eeb51f0cb7b8819e50da6d2444d769
depends on $(ld-option,--no-relax-gp)
-config RISCV_USE_LINKER_RELAXATION
- def_bool y
- # https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985
- depends on !LD_IS_LLD || LLD_VERSION >= 150000
-
# https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
config ARCH_HAS_BROKEN_DWARF5
def_bool y
- depends on RISCV_USE_LINKER_RELAXATION
# https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a
depends on AS_IS_LLVM && AS_VERSION < 180000
# https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index df57654a615e..ecf2fcce2d92 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -46,17 +46,10 @@ else
KBUILD_LDFLAGS += -melf32lriscv
endif
-ifndef CONFIG_RISCV_USE_LINKER_RELAXATION
- KBUILD_CFLAGS += -mno-relax
- KBUILD_AFLAGS += -mno-relax
-ifndef CONFIG_AS_IS_LLVM
- KBUILD_CFLAGS += -Wa,-mno-relax
- KBUILD_AFLAGS += -Wa,-mno-relax
-endif
# LLVM has an issue with target-features and LTO: https://github.com/llvm/llvm-project/issues/59350
# Ensure it is aware of linker relaxation with LTO, otherwise relocations may
# be incorrect: https://github.com/llvm/llvm-project/issues/65090
-else ifeq ($(CONFIG_LTO_CLANG),y)
+ifeq ($(CONFIG_LTO_CLANG),y)
KBUILD_LDFLAGS += -mllvm -mattr=+c -mllvm -mattr=+relax
endif
--
2.50.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 09/12] riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs
2025-08-21 21:15 [PATCH v2 00/12] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
2025-08-21 21:15 ` [PATCH v2 07/12] riscv: Remove version check for LTO_CLANG selects Nathan Chancellor
2025-08-21 21:15 ` [PATCH v2 08/12] riscv: Unconditionally use linker relaxation Nathan Chancellor
@ 2025-08-21 21:15 ` Nathan Chancellor
2025-08-22 12:38 ` Alexandre Ghiti
2025-08-27 17:30 ` Conor Dooley
2025-08-29 22:33 ` [PATCH v2 00/12] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
3 siblings, 2 replies; 10+ messages in thread
From: Nathan Chancellor @ 2025-08-21 21:15 UTC (permalink / raw)
To: linux-kernel
Cc: Arnd Bergmann, Kees Cook, Nick Desaulniers, Bill Wendling,
Justin Stitt, llvm, patches, Nathan Chancellor, Palmer Dabbelt,
Alexandre Ghiti, linux-riscv
Now that the minimum supported version of LLVM for building the kernel
has been bumped to 15.0.0, several ld.lld version checks become
tautological, as they are always true. Replace them with a simple
CONFIG_LD_IS_LLD check.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: linux-riscv@lists.infradead.org
---
arch/riscv/Kconfig | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index d482236e93f4..850ba4b4b534 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -620,7 +620,7 @@ config TOOLCHAIN_HAS_V
default y
depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64imv)
depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32imv)
- depends on LLD_VERSION >= 140000 || LD_VERSION >= 23800
+ depends on LD_IS_LLD || LD_VERSION >= 23800
depends on AS_HAS_OPTION_ARCH
config RISCV_ISA_V
@@ -721,7 +721,7 @@ config TOOLCHAIN_HAS_ZBB
default y
depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb)
depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb)
- depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
+ depends on LD_IS_LLD || LD_VERSION >= 23900
depends on AS_HAS_OPTION_ARCH
# This symbol indicates that the toolchain supports all v1.0 vector crypto
@@ -736,7 +736,7 @@ config TOOLCHAIN_HAS_ZBA
default y
depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zba)
depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zba)
- depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
+ depends on LD_IS_LLD || LD_VERSION >= 23900
depends on AS_HAS_OPTION_ARCH
config RISCV_ISA_ZBA
@@ -771,7 +771,7 @@ config TOOLCHAIN_HAS_ZBC
default y
depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbc)
depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbc)
- depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
+ depends on LD_IS_LLD || LD_VERSION >= 23900
depends on AS_HAS_OPTION_ARCH
config RISCV_ISA_ZBC
@@ -794,7 +794,7 @@ config TOOLCHAIN_HAS_ZBKB
default y
depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbkb)
depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbkb)
- depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
+ depends on LD_IS_LLD || LD_VERSION >= 23900
depends on AS_HAS_OPTION_ARCH
config RISCV_ISA_ZBKB
--
2.50.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 07/12] riscv: Remove version check for LTO_CLANG selects
2025-08-21 21:15 ` [PATCH v2 07/12] riscv: Remove version check for LTO_CLANG selects Nathan Chancellor
@ 2025-08-22 12:31 ` Alexandre Ghiti
2025-08-27 17:31 ` Conor Dooley
1 sibling, 0 replies; 10+ messages in thread
From: Alexandre Ghiti @ 2025-08-22 12:31 UTC (permalink / raw)
To: Nathan Chancellor, linux-kernel
Cc: Arnd Bergmann, Kees Cook, Nick Desaulniers, Bill Wendling,
Justin Stitt, llvm, patches, Palmer Dabbelt, linux-riscv
Hi Nathan,
On 8/21/25 23:15, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been bumped to 15.0.0, there is no need to check the LLD version
> before selecting ARCH_SUPPORTS_LTO_CLANG{,_THIN} because it will always
> be true.
>
> Reviewed-by: Kees Cook <kees@kernel.org>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Alexandre Ghiti <alex@ghiti.fr>
> Cc: linux-riscv@lists.infradead.org
>
> Small note, this will conflict with
> https://lore.kernel.org/20250710-riscv-restrict-lto-to-medany-v1-1-b1dac9871ecf@kernel.org/
> but I think it is simple enough to deal with.
> ---
> arch/riscv/Kconfig | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index a4b233a0659e..1d53bf02d0fa 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -64,9 +64,8 @@ config RISCV
> select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
> select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE
> select ARCH_SUPPORTS_HUGETLBFS if MMU
> - # LLD >= 14: https://github.com/llvm/llvm-project/issues/50505
> - select ARCH_SUPPORTS_LTO_CLANG if LLD_VERSION >= 140000
> - select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >= 140000
> + select ARCH_SUPPORTS_LTO_CLANG
> + select ARCH_SUPPORTS_LTO_CLANG_THIN
> select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS if 64BIT && MMU
> select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
> select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
>
Acked-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Thanks,
Alex
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 08/12] riscv: Unconditionally use linker relaxation
2025-08-21 21:15 ` [PATCH v2 08/12] riscv: Unconditionally use linker relaxation Nathan Chancellor
@ 2025-08-22 12:35 ` Alexandre Ghiti
0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Ghiti @ 2025-08-22 12:35 UTC (permalink / raw)
To: Nathan Chancellor, linux-kernel
Cc: Arnd Bergmann, Kees Cook, Nick Desaulniers, Bill Wendling,
Justin Stitt, llvm, patches, Palmer Dabbelt, linux-riscv
On 8/21/25 23:15, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been bumped to 15.0.0, CONFIG_RISCV_USE_LINKER_RELAXATION will
> always be enabled, so it can be removed.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Alexandre Ghiti <alex@ghiti.fr>
> Cc: linux-riscv@lists.infradead.org
> ---
> arch/riscv/Kconfig | 6 ------
> arch/riscv/Makefile | 9 +--------
> 2 files changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 1d53bf02d0fa..d482236e93f4 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -246,15 +246,9 @@ config HAVE_SHADOW_CALL_STACK
> # https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/a484e843e6eeb51f0cb7b8819e50da6d2444d769
> depends on $(ld-option,--no-relax-gp)
>
> -config RISCV_USE_LINKER_RELAXATION
> - def_bool y
> - # https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985
> - depends on !LD_IS_LLD || LLD_VERSION >= 150000
> -
> # https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
> config ARCH_HAS_BROKEN_DWARF5
> def_bool y
> - depends on RISCV_USE_LINKER_RELAXATION
> # https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a
> depends on AS_IS_LLVM && AS_VERSION < 180000
> # https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77
> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> index df57654a615e..ecf2fcce2d92 100644
> --- a/arch/riscv/Makefile
> +++ b/arch/riscv/Makefile
> @@ -46,17 +46,10 @@ else
> KBUILD_LDFLAGS += -melf32lriscv
> endif
>
> -ifndef CONFIG_RISCV_USE_LINKER_RELAXATION
> - KBUILD_CFLAGS += -mno-relax
> - KBUILD_AFLAGS += -mno-relax
> -ifndef CONFIG_AS_IS_LLVM
> - KBUILD_CFLAGS += -Wa,-mno-relax
> - KBUILD_AFLAGS += -Wa,-mno-relax
> -endif
> # LLVM has an issue with target-features and LTO: https://github.com/llvm/llvm-project/issues/59350
> # Ensure it is aware of linker relaxation with LTO, otherwise relocations may
> # be incorrect: https://github.com/llvm/llvm-project/issues/65090
> -else ifeq ($(CONFIG_LTO_CLANG),y)
> +ifeq ($(CONFIG_LTO_CLANG),y)
> KBUILD_LDFLAGS += -mllvm -mattr=+c -mllvm -mattr=+relax
> endif
>
>
Acked-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Thanks,
Alex
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 09/12] riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs
2025-08-21 21:15 ` [PATCH v2 09/12] riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs Nathan Chancellor
@ 2025-08-22 12:38 ` Alexandre Ghiti
2025-08-27 17:30 ` Conor Dooley
1 sibling, 0 replies; 10+ messages in thread
From: Alexandre Ghiti @ 2025-08-22 12:38 UTC (permalink / raw)
To: Nathan Chancellor, linux-kernel
Cc: Arnd Bergmann, Kees Cook, Nick Desaulniers, Bill Wendling,
Justin Stitt, llvm, patches, Palmer Dabbelt, linux-riscv
On 8/21/25 23:15, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been bumped to 15.0.0, several ld.lld version checks become
> tautological, as they are always true. Replace them with a simple
> CONFIG_LD_IS_LLD check.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Alexandre Ghiti <alex@ghiti.fr>
> Cc: linux-riscv@lists.infradead.org
> ---
> arch/riscv/Kconfig | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index d482236e93f4..850ba4b4b534 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -620,7 +620,7 @@ config TOOLCHAIN_HAS_V
> default y
> depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64imv)
> depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32imv)
> - depends on LLD_VERSION >= 140000 || LD_VERSION >= 23800
> + depends on LD_IS_LLD || LD_VERSION >= 23800
> depends on AS_HAS_OPTION_ARCH
>
> config RISCV_ISA_V
> @@ -721,7 +721,7 @@ config TOOLCHAIN_HAS_ZBB
> default y
> depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb)
> depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb)
> - depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
> + depends on LD_IS_LLD || LD_VERSION >= 23900
> depends on AS_HAS_OPTION_ARCH
>
> # This symbol indicates that the toolchain supports all v1.0 vector crypto
> @@ -736,7 +736,7 @@ config TOOLCHAIN_HAS_ZBA
> default y
> depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zba)
> depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zba)
> - depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
> + depends on LD_IS_LLD || LD_VERSION >= 23900
> depends on AS_HAS_OPTION_ARCH
>
> config RISCV_ISA_ZBA
> @@ -771,7 +771,7 @@ config TOOLCHAIN_HAS_ZBC
> default y
> depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbc)
> depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbc)
> - depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
> + depends on LD_IS_LLD || LD_VERSION >= 23900
> depends on AS_HAS_OPTION_ARCH
>
> config RISCV_ISA_ZBC
> @@ -794,7 +794,7 @@ config TOOLCHAIN_HAS_ZBKB
> default y
> depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbkb)
> depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbkb)
> - depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
> + depends on LD_IS_LLD || LD_VERSION >= 23900
> depends on AS_HAS_OPTION_ARCH
>
> config RISCV_ISA_ZBKB
>
Acked-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Thanks for the v2!
Alex
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 09/12] riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs
2025-08-21 21:15 ` [PATCH v2 09/12] riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs Nathan Chancellor
2025-08-22 12:38 ` Alexandre Ghiti
@ 2025-08-27 17:30 ` Conor Dooley
1 sibling, 0 replies; 10+ messages in thread
From: Conor Dooley @ 2025-08-27 17:30 UTC (permalink / raw)
To: Nathan Chancellor
Cc: linux-kernel, Arnd Bergmann, Kees Cook, Nick Desaulniers,
Bill Wendling, Justin Stitt, llvm, patches, Palmer Dabbelt,
Alexandre Ghiti, linux-riscv
[-- Attachment #1.1: Type: text/plain, Size: 423 bytes --]
On Thu, Aug 21, 2025 at 02:15:46PM -0700, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been bumped to 15.0.0, several ld.lld version checks become
> tautological, as they are always true. Replace them with a simple
> CONFIG_LD_IS_LLD check.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 07/12] riscv: Remove version check for LTO_CLANG selects
2025-08-21 21:15 ` [PATCH v2 07/12] riscv: Remove version check for LTO_CLANG selects Nathan Chancellor
2025-08-22 12:31 ` Alexandre Ghiti
@ 2025-08-27 17:31 ` Conor Dooley
1 sibling, 0 replies; 10+ messages in thread
From: Conor Dooley @ 2025-08-27 17:31 UTC (permalink / raw)
To: Nathan Chancellor
Cc: linux-kernel, Arnd Bergmann, Kees Cook, Nick Desaulniers,
Bill Wendling, Justin Stitt, llvm, patches, Palmer Dabbelt,
Alexandre Ghiti, linux-riscv
[-- Attachment #1.1: Type: text/plain, Size: 463 bytes --]
On Thu, Aug 21, 2025 at 02:15:44PM -0700, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been bumped to 15.0.0, there is no need to check the LLD version
> before selecting ARCH_SUPPORTS_LTO_CLANG{,_THIN} because it will always
> be true.
>
> Reviewed-by: Kees Cook <kees@kernel.org>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 00/12] Bump minimum supported version of LLVM for building the kernel to 15.0.0
2025-08-21 21:15 [PATCH v2 00/12] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
` (2 preceding siblings ...)
2025-08-21 21:15 ` [PATCH v2 09/12] riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs Nathan Chancellor
@ 2025-08-29 22:33 ` Nathan Chancellor
3 siblings, 0 replies; 10+ messages in thread
From: Nathan Chancellor @ 2025-08-29 22:33 UTC (permalink / raw)
To: linux-kernel, Nathan Chancellor
Cc: Arnd Bergmann, Kees Cook, Nick Desaulniers, Bill Wendling,
Justin Stitt, llvm, patches, Nicolas Schier, linux-kbuild,
linux-hardening, Russell King, Ard Biesheuvel, linux-arm-kernel,
Will Deacon, Thomas Bogendoerfer, linux-mips, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy, linuxppc-dev,
Palmer Dabbelt, Alexandre Ghiti, linux-riscv, Marco Elver,
Peter Zijlstra (Intel), kasan-dev
On Thu, 21 Aug 2025 14:15:37 -0700, Nathan Chancellor wrote:
> 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.
>
> [...]
Applied, thanks!
[01/12] kbuild: Bump minimum version of LLVM for building the kernel to 15.0.0
https://git.kernel.org/kbuild/c/20c0989283564
[02/12] arch/Kconfig: Drop always true condition from RANDOMIZE_KSTACK_OFFSET
https://git.kernel.org/kbuild/c/65aebf6f5880e
[03/12] ARM: Clean up definition of ARM_HAS_GROUP_RELOCS
https://git.kernel.org/kbuild/c/02aba266e391f
[04/12] arm64: Remove tautological LLVM Kconfig conditions
https://git.kernel.org/kbuild/c/23cb0514208da
[05/12] mips: Unconditionally select ARCH_HAS_CURRENT_STACK_POINTER
https://git.kernel.org/kbuild/c/e633c2e78fd1c
[06/12] powerpc: Drop unnecessary initializations in __copy_inst_from_kernel_nofault()
https://git.kernel.org/kbuild/c/488954ca195d0
[07/12] riscv: Remove version check for LTO_CLANG selects
https://git.kernel.org/kbuild/c/6578a1ff6aa49
[08/12] riscv: Unconditionally use linker relaxation
https://git.kernel.org/kbuild/c/7ccbe91796d7b
[09/12] riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs
https://git.kernel.org/kbuild/c/87b28d71396bf
[10/12] lib/Kconfig.debug: Drop CLANG_VERSION check from DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
https://git.kernel.org/kbuild/c/a817de20091c3
[11/12] objtool: Drop noinstr hack for KCSAN_WEAK_MEMORY
https://git.kernel.org/kbuild/c/573ad421cc551
[12/12] KMSAN: Remove tautological checks
https://git.kernel.org/kbuild/c/5ff8c11775c74
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-08-30 0:52 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21 21:15 [PATCH v2 00/12] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
2025-08-21 21:15 ` [PATCH v2 07/12] riscv: Remove version check for LTO_CLANG selects Nathan Chancellor
2025-08-22 12:31 ` Alexandre Ghiti
2025-08-27 17:31 ` Conor Dooley
2025-08-21 21:15 ` [PATCH v2 08/12] riscv: Unconditionally use linker relaxation Nathan Chancellor
2025-08-22 12:35 ` Alexandre Ghiti
2025-08-21 21:15 ` [PATCH v2 09/12] riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs Nathan Chancellor
2025-08-22 12:38 ` Alexandre Ghiti
2025-08-27 17:30 ` Conor Dooley
2025-08-29 22:33 ` [PATCH v2 00/12] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).