Bug 14797

Summary: ovmf fails to build with gcc12
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Bernhard Rosenkränzer <bero>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, randy.macleod
Version: unspecified   
Target Milestone: 4.1 M2   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Bernhard Rosenkränzer 2022-04-28 16:11:08 UTC
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).
Comment 1 Ross Burton 2022-05-05 14:38:18 UTC
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.
Comment 2 Ross Burton 2022-05-05 15:24:35 UTC
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.
Comment 3 Ross Burton 2022-07-12 10:52:27 UTC
Looks like this was fixed with oe-core 7b67f19d353d88107f52cceda3c858730ac1db54.