[CMAKE] Fix linux cross compilation with the glibc compatibility
Summary:
Using the glibc compatibility requires librt.so, but it is not part of
the depends subsystem.
This diff adds the cross compiler installation dir to the search path:
- By setting the search prefix explicitely for ARM;
- By using the system path as a fallback to support the x86 platform.
Because of CMake search priority, the libraries from the depends subsystem will always be found first (if they exist).
Depends on D4038.
Test Plan:
cmake -GNinja .. -DENABLE_GLIBC_BACK_COMPAT=ON \ -DBUILD_BITCOIN_QT=OFF \ -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux32.cmake ninja
Repeat with Linux64, LinuxARM and LinuxAArch64
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D4039