Bug 16385

Summary: Enable u-boot build with clang
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: jdmason, jon.mason, mathieu.dubois-briand, meta.mr.watcher, meta.watcher, randy.macleod
Version: 6.1   
Target Milestone: 6.1   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
log.do_compile for u-boot none

Description Ross Burton 2026-08-04 11:45:46 UTC
Our u-boot recipe only supports gcc, but upstream supports clang (the docs suggest it's harder than it is, as the magic options are enabled by default).  Notable, u-boot CI does clang builds.

So, we should also support clang in the recipe.

This will mean removing the TOOLCHAIN assignment and using generic assignments or overrides for CC etc.
Comment 1 Mathieu Dubois-Briand 2026-08-20 12:31:53 UTC
Ross, can you confirm this is fixed by https://git.openembedded.org/openembedded-core/commit/?id=321421117de088e6b23da9c746d16df0c6081323 ?
Comment 2 Jon Mason 2026-08-25 20:04:06 UTC
Created attachment 5244 [details]
log.do_compile for u-boot
Comment 3 Jon Mason 2026-08-25 20:07:01 UTC
I build qemuarm64 with clang (on the latest commit on the master branch, which contains the commit referenced in comment 1).  I attached the log.do_compile for u-boot.  The log shows clang being used to compile it (though there are some weird references to gcc still in there).  So, I believe this can be closed.
Comment 4 Ross Burton 2026-09-01 16:00:59 UTC
Confirmed, closing.