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>
This commit is contained in:
Nathan Chancellor 2023-12-05 16:53:50 -07:00 • committed by Palmer Dabbelt
commit 55b71d2ce1
No known key found for this signature in database
GPG key ID: 2E1319F35FBB1889
2 changed files with 6 additions and 3 deletions