summaryrefslogtreecommitdiff
path: root/lib/Makefile
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2023-12-06 02:53:51 +0300
committerPalmer Dabbelt <palmer@rivosinc.com>2024-01-18 05:08:27 +0300
commitae84ff9a14a5a8d36a329a30626800155782e617 (patch)
tree16b1769cb8952a7095455b596c7944d6ebeaffac /lib/Makefile
parent55b71d2ce133da893ffb1ecd69a34e1fee509292 (diff)
downloadlinux-ae84ff9a14a5a8d36a329a30626800155782e617.tar.xz
riscv: Restrict DWARF5 when building with LLVM to known working versions
LLVM prior to 18.0.0 would generate incorrect debug info for DWARF5 due to linker relaxation, which was worked around in clang by defaulting RISC-V to DWARF4 [1]. Unfortunately, this workaround does not work for the kernel because the DWARF version can be independently changed from the default in Kconfig. Do not allow DWARF5 to be selected for RISC-V when using linker relaxation (ld.lld >= 15.0.0) and a version of LLVM that does not have the fixes (the integrated assembler [2] and ld.lld [3] < 18.0.0) necessary to generate the correct debug info. Link: https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 [1] Link: https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a [2] Link: https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77 [3] Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Fangrui Song <maskray@google.com> Link: https://lore.kernel.org/r/20231205-riscv-restrict-dwarf5-llvm-v2-2-aedf00a382ac@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'lib/Makefile')
0 files changed, 0 insertions, 0 deletions