Skip to content

Draft: RISC-V: don't assume libs to be installed to /lib64 or /lib32

The GCC Linux configuration for other architectures (i386, s390, ...) does not assume that libraries are installed to /lib64 or /lib32. Instead, the configuration for these other architectures includes a comment that the LSB does not enforce the use of /lib64 and /usr/lib64 and therefore these configurations include a check if the lib64 and lib32 directories actually exist before using them. If they do not exist, these configurations fall back to using /lib.

Unfortunately, the Linux configuration for the RISC-V architecture does not include such a check and therefore does not work correctly if libraries are not available in /lib32 and /lib64.

This commit fixes this issue by copying the check and the comment from the existing Linux architecture configurations to the RISC-V Linux configuration. This fixes the -print-multi-os-directory output on RISC-V Alpine Linux (which doesn't have /lib32 and /lib64) and thereby fixes tools which rely on this output, e.g. gcc-go.

Signed-off-by: Sören Tempel soeren@soeren-tempel.net

Edited by Sören Tempel

Merge request reports