Skip to contentSkip to conversation

allarch: Disable icecc for allarch recipes

PATCH Superseded Martin Jansa 1 participant 3 messages Nov 27, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 allarch: Disable icecc for allarch recipes

* Fix icecc.bbclass failing with:
ERROR: recipe-name NULL prefix
when it's used with empty TARGET_PREFIX.
* Allarch recipes cannot use compiler at all (even the local one) so there is no point of using icecc for them.

---
 meta/classes/icecc.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/classes/icecc.bbclass +8 -0
index 49dbd77..ef8761a 100644
@@ -90,6 +90,10 @@ def create_path(compilers, bb, d):
     return staging
 
 def use_icc(bb,d):
+    # allarch recipes don't use compiler
+    if icc_is_allarch(bb, d):
+        return "no"
+
     package_tmp = d.expand('${PN}')
 
     system_class_blacklist = [ "none" ] 
@@ -124,6 +128,10 @@ def use_icc(bb,d):
 
     return "yes"
 
+def icc_is_allarch(bb, d):
+    return \
+        bb.data.inherits_class("allarch", d);
+
 def icc_is_kernel(bb, d):
     return \
         bb.data.inherits_class("kernel", d);
Signature · 1 line
1.8.4.3
#1 lore raw

PATCH v2 1/1 icecc: Disable icecc for allarch recipes

* Fix icecc.bbclass failing with:
ERROR: recipe-name NULL prefix
when it's used with empty TARGET_PREFIX.
* Allarch recipes cannot use compiler at all (even the local one) so there is no point of using icecc for them.

---
 meta/classes/icecc.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/classes/icecc.bbclass +8 -0
index 49dbd77..ef8761a 100644
@@ -90,6 +90,10 @@ def create_path(compilers, bb, d):
     return staging
 
 def use_icc(bb,d):
+    # allarch recipes don't use compiler
+    if icc_is_allarch(bb, d):
+        return "no"
+
     package_tmp = d.expand('${PN}')
 
     system_class_blacklist = [ "none" ] 
@@ -124,6 +128,10 @@ def use_icc(bb,d):
 
     return "yes"
 
+def icc_is_allarch(bb, d):
+    return \
+        bb.data.inherits_class("allarch", d);
+
 def icc_is_kernel(bb, d):
     return \
         bb.data.inherits_class("kernel", d);
Signature · 1 line
1.8.4.3
#2 lore raw

PATCH 1/1 icecc: Don't replace non-empty PARALLEL_MAKE with empty ICECC_PARALLEL_MAKE

In reply to Martin Jansa

* it's needed for use-case like this:
# Inherit icecc here, so that all builders have the same sstate signatures INHERIT_DISTRO += "icecc"

  # and then disable its function by default (so that people still need to explicity
  # enable it in local.conf if they have configured icecc and want to use it.
  # You need to set _empty_ value in local.conf to enable icecc function:
  # ICECC_DISABLED = ""
  ICECC_DISABLED ??= "1"
* so default ICECC_PARALLEL_MAKE is still empty, but we want build
  to respect our PARALLEL_MAKE, unfortunately we cannot do something
  like ICECC_PARALLEL_MAKE ??= "${PARALLEL_MAKE}", because that would
  cause PARALLEL_MAKE to reference itself.
---
 meta/classes/icecc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/icecc.bbclass +1 -1
index ef8761a..60263a8 100644
@@ -146,7 +146,7 @@ def icc_version(bb, d):
         return ""
 
     parallel = d.getVar('ICECC_PARALLEL_MAKE') or ""
-    if not d.getVar('PARALLEL_MAKE') == "":
+    if not d.getVar('PARALLEL_MAKE') == "" and parallel:
         d.setVar("PARALLEL_MAKE", parallel)
 
     if icc_is_native(bb, d):
Signature · 1 line
1.8.4.3