diff options
author | Tobias Henkel <tobias.henkel@bmw-carit.de> | 2013-11-12 09:34:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-12 16:00:29 +0000 |
commit | 19c65b25a9a7b5b822dfc1edd21578a14f0a0820 (patch) | |
tree | 6ef509de4f997bbaf7a7c7b5ffce9e3f52c733dc | |
parent | d283bfd96033cbf6e98f4c34d4c1ae4592686393 (diff) | |
download | poky-19c65b25a9a7b5b822dfc1edd21578a14f0a0820.tar.gz |
icecc: Support shell evaluation of KERNEL_CC
In the current implementation a KERNEL_CC variable containing shell
evaluation breaks the build process. Shell expansion is not happening
before general expansion in get_cross_kernel_cc which results in a
syntax error and an aborted parse process.
Before expanding the KERNEL_CC variable get_cross_kernel_cc now checks
for backticks or '$(' in the KERNEL_CC variable and performs a shell
evaluation using a call to echo if it finds one.
(From OE-Core rev: b28bae30fc5d8d1d7cc675ddb4159c39fb9bc3fd)
Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/icecc.bbclass | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass index 8655883d8a..31ad7a1691 100644 --- a/meta/classes/icecc.bbclass +++ b/meta/classes/icecc.bbclass | |||
@@ -41,7 +41,13 @@ def icecc_dep_prepend(d): | |||
41 | DEPENDS_prepend += "${@icecc_dep_prepend(d)} " | 41 | DEPENDS_prepend += "${@icecc_dep_prepend(d)} " |
42 | 42 | ||
43 | def get_cross_kernel_cc(bb,d): | 43 | def get_cross_kernel_cc(bb,d): |
44 | kernel_cc = d.expand('${KERNEL_CC}') | 44 | kernel_cc = d.getVar('KERNEL_CC') |
45 | |||
46 | # evaluate the expression by the shell if necessary | ||
47 | if '`' in kernel_cc or '$(' in kernel_cc: | ||
48 | kernel_cc = os.popen("echo %s" % kernel_cc).read()[:-1] | ||
49 | |||
50 | kernel_cc = d.expand(kernel_cc) | ||
45 | kernel_cc = kernel_cc.replace('ccache', '').strip() | 51 | kernel_cc = kernel_cc.replace('ccache', '').strip() |
46 | kernel_cc = kernel_cc.split(' ')[0] | 52 | kernel_cc = kernel_cc.split(' ')[0] |
47 | kernel_cc = kernel_cc.strip() | 53 | kernel_cc = kernel_cc.strip() |