GetPrerequisites: Allow overriding gp_tool with cross-ldd
We use a custom ldd script which has the cross-compilation target in its name, like x86_64-foo-linux-gnu-ldd
. It's derived from this: https://github.com/crosstool-ng/crosstool-ng/blob/master/scripts/xldd.in
It would be great if CMake would allow us to set gp_tool
in the toolchain file. But currently it only allows gp_tool
to be set to ldd
.
We're currently patching Modules/GetPrerequisites.cmake
:
sed -i 's/gp_tool STREQUAL "ldd"/\0 OR gp_tool MATCHES "-ldd$"/' Modules/GetPrerequisites.cmake
But it would be great if CMake supported this out-of-the-box.