Bug 11528 - Enable simple toolchain switching
Summary: Enable simple toolchain switching
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 5.3 M1
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 9417
  Show dependency tree
 
Reported: 2017-05-18 16:26 UTC by Ross Burton
Modified: 2025-07-14 10:33 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2017-05-18 16:26:00 UTC
It should be as simple to change toolchain as it is to change libc.

There's a few places where gcc is hardcoded such as base.bbclass:

BASE_DEFAULT_DEPS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc"

meta-clang defines a TOOLCHAIN variable that can be set to gcc or clang, and changes what compiler is being used.  I think this should end up pulling in an include file such as the way TCLIBC is used, and oe-core can provide toolchain-gcc.inc with meta-clang providing toolchain-clang.inc.

Hopefully this will let us remove the nasty in clang.bbclass (https://github.com/kraj/meta-clang/blob/master/classes/clang.bbclass)
Comment 1 Scott Branden 2017-09-14 07:03:05 UTC
This worked fine in 2.4 M2.  Fails with latest
Comment 2 Scott Branden 2017-09-14 07:05:41 UTC
This worked fine in 2.4 M2.  Fails with latest
Comment 3 Scott Branden 2017-09-14 07:07:51 UTC
(In reply to comment #2)
> This worked fine in 2.4 M2.  Fails with latest

Sorry - I commented and modified the wrong Bug here
Comment 4 Ross Burton 2025-02-07 12:35:12 UTC
We might just make this in time for M3.
Comment 5 Ross Burton 2025-07-14 10:33:07 UTC
This merged in oe-core 45bdedd213aff8df3214b95ef2a8551c0abd93a0.