Despite some efforts to fix it in the recipe, building edk2 (part of ovmf) uses the host system's gcc. This can be easily observed by installing gcc 12 on the host (edk2 currently doesn't compile with gcc 12, patches for that are underway).
Can you share a log showing this problem? Note that edk2 does build some tools with the host compiler because it needs to run them at build time.
The reason I believe this is entirely expected use of host GCC to build binaries to run on the host is that I can build ovmf on aarch64, or edk2 for Arm on a x86, so the host compiler is definitely not being used to compile target code.
Looks like this was fixed with oe-core 7b67f19d353d88107f52cceda3c858730ac1db54.