Using non-standard linker

David Chisnall theraven at FreeBSD.org
Thu Dec 13 13:20:16 UTC 2012


On 13 Dec 2012, at 13:18, Erik Cederstrand wrote:

>> The easiest way of doing this is to make /usr/bin/ld (in the host system and in the bootstrap) into a symbolic link that points to whatever the selected linker is.  I had to do this when testing gold as well (we end up with ld-gold and ld-bfd and ld being a symlink to one of them).
> 
> Yes, a symlink is of course an easy solution post-install. But 'ld' is built as part of 'make toolchain', I believe, so this approach wouldn't work if I wanted mclinker to be used as the linker in 'make buildworld'. The newly built 'ld' in /usr/obj/ would be used as the linker instead.

That's why I said 'and in the bootstrap'.  You'd also need to ensure that the bootstrap build of clang and binutils set up the symlink.  Purely for testing, I think you can do this manually by doing the bootstrap and then the buildworld as separate make invocations.

David


More information about the freebsd-toolchain mailing list