summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry_eremin@mentor.com>2015-01-15 13:11:51 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-16 23:08:19 +0000
commitc2c4579c499163f3e36a4eaf330cfe2f6057fc2c (patch)
treedee6c28b9d8a0404dedfb6b2dbfa5f527414aee4 /meta
parentdb2255dc0bb57d37464de6b4552ee80a7d5c1368 (diff)
downloadpoky-c2c4579c499163f3e36a4eaf330cfe2f6057fc2c.tar.gz
icecc.bbclass: properly handle disabling of icecc
Always use use_icc to check if IceCC should be enabled. Move ICECC_DISABLED variable checking to use_icc function. Also while we are at it, fix condition in icc_is_allarch function. (From OE-Core rev: 20b0168da47d6e30fcbaf6adab3bde0d398d0d00) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/icecc.bbclass15
1 files changed, 7 insertions, 8 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 3ec8c0667d..2f9e3cf8ef 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -91,6 +91,10 @@ def create_path(compilers, bb, d):
91 return staging 91 return staging
92 92
93def use_icc(bb,d): 93def use_icc(bb,d):
94 if d.getVar('ICECC_DISABLED') == "1":
95 # don't even try it, when explicitly disabled
96 return "no"
97
94 # allarch recipes don't use compiler 98 # allarch recipes don't use compiler
95 if icc_is_allarch(bb, d): 99 if icc_is_allarch(bb, d):
96 return "no" 100 return "no"
@@ -133,8 +137,7 @@ def use_icc(bb,d):
133 return "yes" 137 return "yes"
134 138
135def icc_is_allarch(bb, d): 139def icc_is_allarch(bb, d):
136 return \ 140 return d.getVar("PACKAGE_ARCH") == "all"
137 bb.data.inherits_class("allarch", d);
138 141
139def icc_is_kernel(bb, d): 142def icc_is_kernel(bb, d):
140 return \ 143 return \
@@ -148,10 +151,6 @@ def icc_is_native(bb, d):
148# Don't pollute allarch signatures with TARGET_FPU 151# Don't pollute allarch signatures with TARGET_FPU
149icc_version[vardepsexclude] += "TARGET_FPU" 152icc_version[vardepsexclude] += "TARGET_FPU"
150def icc_version(bb, d): 153def icc_version(bb, d):
151 if d.getVar('ICECC_DISABLED') == "1":
152 # don't even try it, when explicitly disabled
153 return ""
154
155 if use_icc(bb, d) == "no": 154 if use_icc(bb, d) == "no":
156 return "" 155 return ""
157 156
@@ -179,7 +178,7 @@ def icc_version(bb, d):
179 return tar_file 178 return tar_file
180 179
181def icc_path(bb,d): 180def icc_path(bb,d):
182 if d.getVar('ICECC_DISABLED') == "1": 181 if use_icc(bb, d) == "no":
183 # don't create unnecessary directories when icecc is disabled 182 # don't create unnecessary directories when icecc is disabled
184 return 183 return
185 184
@@ -246,7 +245,7 @@ def set_icecc_env():
246 return 245 return
247 246
248set_icecc_env() { 247set_icecc_env() {
249 if [ "${ICECC_DISABLED}" = "1" ] 248 if [ "${@use_icc(bb, d)}" = "no" ]
250 then 249 then
251 return 250 return
252 fi 251 fi