Crossdirect: patch cross-ld to support -rpath-link, so we can stop using qemu binary for linking
In !318 (merged), the following workaround was added:
Cross linker (e.g. ld from binutils-armhf) does not support any method of setting additional link paths, and this causes problems when building various packages. Work around this problem by calling the qemu binary instead of the cross binary from the native chroot, whenever we are linking.
This has a performance impact, so it would be nice to resolve this longterm:
Regarding performance, this is the same way as distcc does it. We would get a performance gain if we were able to use the cross-linker. But so far I could not figure out how to patch the binutils source to make it work like we want to have it. Maybe I'll ask on some binutils mailing list for advice. In the meantime, this workaround should make crossdirect work for all use-cases, and it is still faster than the previous distcc setup, because we can avoid the overhead of setting up and running a ssh server locally to work around missing authentication in distcc (see pmbootstrap!1649 (merged)). Let's test this for some more time, and then make a pmbootstrap release that rolls out crossdirect for everyone.
Attempts/workflows for patching binutils and testing, and more details about this issue in general, are documented in #227 (closed). I did not write to said ML yet, and honestly since we have a workaround in place now, there are more urgent tasks that I'm interested in fixing (e.g. bpo!).