RISC-V: Fix libpath_suffix selection for ldscript

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.

Signed-off-by: Mark Goncharov <mark.goncharov@syntacore.com>
6 files changed