OpenEmbedded doesn’t build a user friendly cross compiler by default. It does build the pieces you need for a cross compiler.
Running “MACHINE=unmatched bitbake meta-toolchain” will build an installable cross toolchain image with a sysroot. Mostly this will just package together stuff you have already built. You can find it in build/tmp-glibc/deploy/sdk. Run the .sh script to install it, it will ask for an install dir. Then in the install dir source the environment file and it will set environment variables like CC and CLANGCC to point at the cross compiler. Looks like this only puts glibc in the sysroot.
You can also use “MACHINE=unmatched bitbake -c populate_sdk demo-coreip-xfce4” which might be better if you need more libraries in the sysroot.
If I try both meta-toolchain and -c populate_sdk I get an error saying I can’t overwrite the other toolchain, and have to delete or move it for the build to succeed.
meta-toolchain produces a 1.5GB toolchain. populate_sdk produces a 15GB toolchain.
I don’t have experience using this stuff. I would sugggest reading OE and/or Yocto docs. Here is one reference for instance
And maybe ask someplace where there are OE experts.