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.

riscv: Unconditionally use linker relaxation

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.

Acked-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20250821-bump-min-llvm-ver-15-v2-8-635f3294e5f0@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

+1 -14
-6
arch/riscv/Kconfig
··· 246 246 # https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/a484e843e6eeb51f0cb7b8819e50da6d2444d769 247 247 depends on $(ld-option,--no-relax-gp) 248 248 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 249 # https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 255 250 config ARCH_HAS_BROKEN_DWARF5 256 251 def_bool y 257 - depends on RISCV_USE_LINKER_RELAXATION 258 252 # https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a 259 253 depends on AS_IS_LLVM && AS_VERSION < 180000 260 254 # https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77
+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