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-02-11 17:40:06 +0000
commit0de0abd9e4839847abb4a9283bb9a9ee7f46f167 (patch)
tree9386fdfa9ad3d67f0d14c5b48972f699b1878516 /meta
parent8010a0f2cf1401c06b927f4bb729ffb3fa4d4bc2 (diff)
downloadpoky-0de0abd9e4839847abb4a9283bb9a9ee7f46f167.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) (From OE-Core rev: 72ff97a2ec225bafb83be56ca1b8c3c4e68a0c55) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.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