[PATCH] ldscript: riscv: Fix libpath_suffix selection

Alan Modra amodra@gmail.com
Sat Jul 5 12:07:57 GMT 2025


On Thu, Jul 03, 2025 at 02:53:22PM +0000, Mark Goncharov wrote:
> When building a cross-compiler ld for RISC-V Linux systems, you can specify target=riscv64*-linux* to create a linker that supports both 32-bit (-march=rv32*) and 64-bit (-march=rv64*) architectures.
> The specified -march value populates the EMULATION_NAME variable, which determines the default linker script selection.
> For proper riscv64 target support, the build process must prepare both elf32lriscv* and elf64lriscv* linker scripts.
> These should align with the standard RISC-V Linux sysroot directory structure.

Makes sense to me, but I'm not a riscv maintainer so you should wait
for approval from one of them.

-- 
Alan Modra


More information about the Binutils mailing list