aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2017-08-19 09:41:35 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-23 08:47:05 +0100
commitd4564ee59df907d1e01a3610ac88a35f9a78c1ce (patch)
tree9ec0e3a6df1e03018d4b5c758e6c752b1f6e157a /meta
parent2a044f1e4f5c63e11e631b31f741c7aabfa6f601 (diff)
downloadopenembedded-core-contrib-d4564ee59df907d1e01a3610ac88a35f9a78c1ce.tar.gz
kernel.bbclass: external toolchain fix
Refactor get_cc_option so it is simpler and also does not fail when using external toolchain. 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.bbclass7
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 () {
# Check if KERNEL_CC supports the option "file-prefix-map".
# This option allows us to build images with __FILE__ values that do not
# contain the host build path.
- cc_option_supported=`${KERNEL_CC} -Q --help=joined | grep ffile-prefix-map`
- cc_extra=""
- if [ $cc_option_supported = "-ffile-prefix-map=<old=new>" ]; then
- cc_extra=-ffile-prefix-map=${S}=/kernel-source/
+ if ${KERNEL_CC} -Q --help=joined | grep -q "\-ffile-prefix-map=<old=new>"; then
+ echo "-ffile-prefix-map=${S}=/kernel-source/"
fi
- echo $cc_extra
}
kernel_do_compile() {