- build mips64 with mips-gcc6 toolchain (32-bit mips builds fine)
MIPS is kind of special as we use the same toolchain for multiple ABIs whereas for most other platforms we use a dedicated toolchain for each ABI where the default ABI matches. lld is a bit better about this as it will infer the emulation from the object files. If powerpc were fixed to use a shared GCC toolchain for powerpc and powerpc64 it would probably need this, similar to if we had a shared amd64/i386 GCC.
The kernel uses an explicit LD for the link of the kernel itself and we have LD_EMULATION_<machine_arch> helper variables in kern.post.mk IIRC to deal with that. I think we also use those for some of the firmware blob stuff. We mostly avoid explicit LD though (and arguably we should avoid it whenever possible, though ld -r is a case we can't use the compiler driver to do)