From: Nathan Chancellor <nathan@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>, Kees Cook <kees@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
llvm@lists.linux.dev, patches@lists.linux.dev,
Nathan Chancellor <nathan@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Alexandre Ghiti <alex@ghiti.fr>,
linux-riscv@lists.infradead.org
Subject: [PATCH v2 08/12] riscv: Unconditionally use linker relaxation
Date: Thu, 21 Aug 2025 14:15:45 -0700 [thread overview]
Message-ID: <20250821-bump-min-llvm-ver-15-v2-8-635f3294e5f0@kernel.org> (raw)
In-Reply-To: <20250821-bump-min-llvm-ver-15-v2-0-635f3294e5f0@kernel.org>
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
next prev parent reply other threads:[~2025-08-21 21:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
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 01/12] kbuild: Bump minimum " Nathan Chancellor
2025-08-21 21:15 ` [PATCH v2 02/12] arch/Kconfig: Drop always true condition from RANDOMIZE_KSTACK_OFFSET Nathan Chancellor
2025-08-21 21:15 ` [PATCH v2 03/12] ARM: Clean up definition of ARM_HAS_GROUP_RELOCS Nathan Chancellor
2025-08-22 7:05 ` Arnd Bergmann
2025-08-22 20:03 ` Arnd Bergmann
2025-08-26 13:18 ` Ard Biesheuvel
2025-08-21 21:15 ` [PATCH v2 04/12] arm64: Remove tautological LLVM Kconfig conditions Nathan Chancellor
2025-08-21 21:15 ` [PATCH v2 05/12] mips: Unconditionally select ARCH_HAS_CURRENT_STACK_POINTER Nathan Chancellor
2025-08-21 21:15 ` [PATCH v2 06/12] powerpc: Drop unnecessary initializations in __copy_inst_from_kernel_nofault() Nathan Chancellor
2025-08-22 10:01 ` Christophe Leroy
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 ` Nathan Chancellor [this message]
2025-08-22 12:35 ` [PATCH v2 08/12] riscv: Unconditionally use linker relaxation 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-21 21:15 ` [PATCH v2 10/12] lib/Kconfig.debug: Drop CLANG_VERSION check from DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT Nathan Chancellor
2025-08-21 21:15 ` [PATCH v2 11/12] objtool: Drop noinstr hack for KCSAN_WEAK_MEMORY Nathan Chancellor
2025-08-21 21:15 ` [PATCH v2 12/12] KMSAN: Remove tautological checks 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250821-bump-min-llvm-ver-15-v2-8-635f3294e5f0@kernel.org \
--to=nathan@kernel.org \
--cc=alex@ghiti.fr \
--cc=arnd@arndb.de \
--cc=justinstitt@google.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=palmer@dabbelt.com \
--cc=patches@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).