The KERNEL_CC variable usage was introduced by commit d2fcaeb153fd
("icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time,
2018-12-20") and is set once a recipe pulls the kernel-arch.bbclass.
There are a few packages, e.g. u-boot, barebox, devicetree, perf which
pull this class and for such packages the get_cross_kernel_cc() return
None because icecc_is_kernel() fail.

Fix this for now by replacing the KERNEL_CC check with the
icecc_is_kernel() helper, which is also used by the
get_cross_kernel_cc().

That said it's still not very robust to determine a compiler based on
a variable or inherited class but at least it fixes the issue for now.

Signed-off-by: Marco Felsch <[email protected]>
---
Changelog:

v2:
- New patch

 meta/classes/icecc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 8fe9739f870d..8a48f2ad63dc 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -358,7 +358,7 @@ python set_icecc_env() {
     symlink_path = os.path.join(ICE_PATH, "symlinks")
     bb.utils.mkdirhier(symlink_path)
     compilers = []
-    if d.getVar('KERNEL_CC'):
+    if icecc_is_kernel(bb, d):
         compilers.append(get_cross_kernel_cc(bb,d))
     else:
         host_prefix = d.getVar('HOST_PREFIX')
-- 
2.39.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#208600): 
https://lists.openembedded.org/g/openembedded-core/message/208600
Mute This Topic: https://lists.openembedded.org/mt/110066321/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to