riscv: Hoist linker relaxation disabling logic into Kconfig
authorNathan Chancellor <nathan@kernel.org>
Tue, 5 Dec 2023 23:53:50 +0000 (16:53 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 18 Jan 2024 02:08:26 +0000 (18:08 -0800)
commit55b71d2ce133da893ffb1ecd69a34e1fee509292
treecb6fc3d4e8155c6a216d6cc8f7771d9e8261be2c
parentb85ea95d086471afb4ad062012a4d73cd328fa86
riscv: Hoist linker relaxation disabling logic into Kconfig

Certain configurations may need to be disabled if linker relaxation is
in use, such as DWARF5 with ld.lld < 18. Hoist the logic of whether or
not linker relaxation is in use into Kconfig so decisions can be made at
configuration time.

Reviewed-by: Fangrui Song <maskray@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20231205-riscv-restrict-dwarf5-llvm-v2-1-aedf00a382ac@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/Kconfig
arch/riscv/Makefile