From: Zbigniew Jędrzejewski-Szmek Date: Wed, 17 Nov 2021 14:10:20 +0000 (+0100) Subject: shared/base-filesystem: add define for riscv64 X-Git-Tag: v250-rc1~192^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=761e9382a036d9cc7363fca56b261d914050c51d;p=thirdparty%2Fsystemd.git shared/base-filesystem: add define for riscv64 https://wiki.debian.org/ArchitectureSpecificsMemo shows the triplet, but no the linker paths. I used the linker path from Fedora. $ ls -l /lib /lib64 lrwxrwxrwx. 1 root root 7 Aug 13 2020 /lib -> usr/lib lrwxrwxrwx. 1 root root 9 Aug 13 2020 /lib64 -> usr/lib64 $ ldd /bin/sh|grep ld /lib/ld-linux-riscv64-lp64d.so.1 (0x0000003fb8185000) $ ls -l /lib/ld-linux-riscv64-lp64d.so.1 lrwxrwxrwx 1 root root 19 Aug 4 19:28 /lib/ld-linux-riscv64-lp64d.so.1 -> ../lib64/ld-2.32.so $ uname -r 5.10.6+ So even though the canonical linker path uses /lib/, we need the /lib64 symlink to be present. --- diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c index 422e4d66188..d278000c9ca 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -81,6 +81,10 @@ static const BaseFilesystem table[] = { #elif defined(__riscv) # if __riscv_xlen == 32 # elif __riscv_xlen == 64 + /* Same situation as for aarch64 */ + { "lib64", 0, "usr/lib/riscv64-linux-gnu\0" + "usr/lib64\0", "ld-linux-riscv64-lp64d.so.1" }, +# define KNOW_LIB64_DIRS 1 # else # error "Unknown RISC-V ABI" # endif