[PATCH 0/2] RISC-V: Disable DWARF5 with known broken LLVM versions

Fangrui Song maskray at google.com
Thu Nov 30 08:03:27 PST 2023


On Wed, Nov 29, 2023 at 3:30 PM Nathan Chancellor <nathan at kernel.org> wrote:
>
> Hi all,
>
> This series disables DWARF5 for LLVM versions where it is known to be
> broken due to linker relaxation:
>
> https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
>
> If I understand correctly, it sounds like GNU binutils has a similar
> issue but I am not sure of the status of the fixes and such, so I did
> not bother with checking for it but it should be easy to add if so
> desired.

Using Clang with -fno-integrated-as requires binutils>=2.41
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f1cd8b94e7c941c2a9107c1112ab2339916b8efd
"RISC-V: Support subtraction of .uleb128."

Using -fno-integrated-as is less common nowadays, so I agree we do not
bother with checking for it now, if it is too troublesome.

> Cheers,
> Nathan
>
> ---
> Nathan Chancellor (2):
>       riscv: Hoist linker relaxation disabling logic into Kconfig
>       riscv: Restrict DWARF5 when building with LLVM to known working versions
>
>  arch/riscv/Kconfig  | 14 ++++++++++++++
>  arch/riscv/Makefile |  4 +---
>  lib/Kconfig.debug   |  1 +
>  3 files changed, 16 insertions(+), 3 deletions(-)
> ---
> base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
> change-id: 20231129-riscv-restrict-dwarf5-llvm-a9824bb974cb
>
> Best regards,
> --
> Nathan Chancellor <nathan at kernel.org>
>


-- 
宋方睿



More information about the linux-riscv mailing list