find_package: two level lib path spport for RISC-V arch
for ARCH=RISC-V
, the glibc use two level lib path [1], which will actually expand to
/usr/lib64/lp64d
if we take the "64BIT double-floating point profile" as example
so this will break cmake search patch, because current it's path is PREFIX/(lib/ARCH|lib*|share)/
,
which actually will expand to
PREFIX/lib/ARCH
PREFIX/lib32/
PREFIX/lib64/
PREFIX/libx32/
PREFIX/lib/
PREFIX/share/
the proposal idea is that we also add PREFIX/{CMAKE_INSTALL_LIBDIR}
,
in Gentoo Linux CMAKE_INSTALL_LIBDIR
expand to correct path according to different ABI profile,
take the "64BIT double-floating point profile" as example, it will expand to path PREFIX/lib64/lp64d/
and attached file is a RFC proposal fix for this
[1] glibc patch
[2] Gentoo Linux downstream bug report
https://bugs.gentoo.org/781134
https://bugs.gentoo.org/780846
[3] proposal patch
Edited by Brad King