Setup an external toolchain with Yocto
From KoanSoftware Wiki
You can use the sourcery g++ toolchain, but it requires custom tuning arguments to control selection of the multilib in the external toolchain sysroots, so you should switch to a separate layer and override the tuning files in question.
For example.
If you want to see an example of external toolchain stuff that works, see the meta-sourcery layer.
Watch this presentation about how to setup an external toolchain with oe-core.