diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2017-08-19 09:41:35 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-23 12:06:51 +0100 |
commit | 06ff0a9c8a26e394d65cf00ec6b9f1d1958c7fcf (patch) | |
tree | 6bde36d74dec584b650a6e8984ddcc1ab73807ed /meta | |
parent | 07348bb76f6617477e164db9245a1a98f1a18569 (diff) | |
download | poky-06ff0a9c8a26e394d65cf00ec6b9f1d1958c7fcf.tar.gz |
kernel.bbclass: external toolchain fix
Refactor get_cc_option so it is simpler and also does not fail
when using external toolchain.
(From OE-Core rev: d4564ee59df907d1e01a3610ac88a35f9a78c1ce)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/kernel.bbclass | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 2a765547ac..3cc0432fcf 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -259,12 +259,9 @@ get_cc_option () { | |||
259 | # Check if KERNEL_CC supports the option "file-prefix-map". | 259 | # Check if KERNEL_CC supports the option "file-prefix-map". |
260 | # This option allows us to build images with __FILE__ values that do not | 260 | # This option allows us to build images with __FILE__ values that do not |
261 | # contain the host build path. | 261 | # contain the host build path. |
262 | cc_option_supported=`${KERNEL_CC} -Q --help=joined | grep ffile-prefix-map` | 262 | if ${KERNEL_CC} -Q --help=joined | grep -q "\-ffile-prefix-map=<old=new>"; then |
263 | cc_extra="" | 263 | echo "-ffile-prefix-map=${S}=/kernel-source/" |
264 | if [ $cc_option_supported = "-ffile-prefix-map=<old=new>" ]; then | ||
265 | cc_extra=-ffile-prefix-map=${S}=/kernel-source/ | ||
266 | fi | 264 | fi |
267 | echo $cc_extra | ||
268 | } | 265 | } |
269 | 266 | ||
270 | kernel_do_compile() { | 267 | kernel_do_compile() { |