Skip to content

RISC-V: avoid build issues for clang/llvm-17 with binutils 2.35

Conor Dooley linux-riscv llvm stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2RISC-V: move zicsr/zifencei spec version check to Kconfigarch/riscv/Kconfig arch/riscv/Makefile+11 -45 replies
2/2RISC-V: make TOOLCHAIN_NEEDS_SPEC_20191213 gas onlyarch/riscv/Kconfig+1 -21 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchNathan Chancellor
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/2] RISC-V: avoid build issues for clang/llvm-17 with binutils 2.35

From: Conor Dooley <[email protected]>

Hey,
Here's an attempted (interim?) fix for issues on v5.10 due to the
presence of zifencei & zicsr in object files. I'm seeing another issue
that only appears with ld from binutils-2.35 & not with ld from
binutils-2.37 on riscv/for-next:
/stuff/toolchains/binutils-2.35/bin/riscv64-linux-gnu-ld: .init.data has both ordered [__patchable_function_entries' in init/main.o] and unordered [.meminit.data' in mm/sparse.o] sections /stuff/toolchains/binutils-2.35/bin/riscv64-linux-gnu-ld: final link failed: bad value
But that's far far further on in the build than we were getting before
these patches.

Even if we end up dealing with the emitted strings a different way [1], I think the first patch here has some value in moving the check to Kconfig so that it's far easier to tell if the toolchain does need/use these extensions from someone's build artifacts.

Cheers,
Conor.

1 - https://lore.kernel.org/linux-riscv/[email protected]/

Conor Dooley (2):
RISC-V: move zicsr/zifencei spec version check to Kconfig
RISC-V: make TOOLCHAIN_NEEDS_SPEC_20191213 gas only

 arch/riscv/Kconfig  | 9 +++++++++
 arch/riscv/Makefile | 5 +----
 2 files changed, 10 insertions(+), 4 deletions(-)
Signature · 1 line
2.39.1