From: Zbigniew Jędrzejewski-Szmek Date: Wed, 17 Nov 2021 14:01:18 +0000 (+0100) Subject: shared/base-filesystem: add define for ppc64el X-Git-Tag: v250-rc1~192^2~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e98157b9752a354b54a97fade7a66c583fdd670e;p=thirdparty%2Fsystemd.git shared/base-filesystem: add define for ppc64el https://wiki.debian.org/ArchitectureSpecificsMemo shows the triplet, but no the linker paths. I used the linker path from Fedora, but I can't look up the linker paths for BE and 32 bit. At least the ifdef scaffolding is provided, so it should be trivial to fill in if somebody has access to such a system. $ ls -l /lib /lib64 lrwxrwxrwx. 1 root root 7 Jan 26 2021 /lib -> usr/lib lrwxrwxrwx. 1 root root 9 Jan 26 2021 /lib64 -> usr/lib64 $ ldd /bin/sh|grep ld /lib64/ld64.so.2 (0x00007fffa0a90000) $ uname -r 5.14.9-200.fc34.ppc64le Note that the macro defines listed in the wiki page don't match what I get on Fedora: __PPC64__ vs. __ppc64__. $ cpp -dM < /dev/null |grep -iE '__(powerpc|ppc)'|sort #define __powerpc__ 1 #define __powerpc64__ 1 #define __PPC__ 1 #define __PPC64__ 1 First half of the fix for #14311. --- diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c index a07cd22e7ed..422e4d66188 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -69,6 +69,15 @@ static const BaseFilesystem table[] = { # error "Unknown MIPS ABI" # endif #elif defined(__powerpc__) +# if defined(__PPC64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + { "lib64", 0, "usr/lib/powerpc64le-linux-gnu\0" + "usr/lib64\0", "ld64.so.2" }, +# define KNOW_LIB64_DIRS 1 +# elif defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + /* powerpc64-linux-gnu */ +# else + /* powerpc-linux-gnu */ +# endif #elif defined(__riscv) # if __riscv_xlen == 32 # elif __riscv_xlen == 64