]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/base-filesystem: add define for riscv64
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 17 Nov 2021 14:10:20 +0000 (15:10 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 Nov 2021 14:30:08 +0000 (15:30 +0100)
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.

src/shared/base-filesystem.c

index 422e4d6618842e15699fdb6d7f3c0dab153bd19d..d278000c9caa94ee62f4525b73f914217ab13b6e 100644 (file)
@@ -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