From: Juro Bystricky Date: Sat, 19 Aug 2017 16:41:35 +0000 (-0700) Subject: kernel.bbclass: external toolchain fix X-Git-Tag: 2017-10~486 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=d4564ee59df907d1e01a3610ac88a35f9a78c1ce;p=openembedded-core.git 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 Signed-off-by: Richard Purdie --- 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=" ]; then - cc_extra=-ffile-prefix-map=${S}=/kernel-source/ + if ${KERNEL_CC} -Q --help=joined | grep -q "\-ffile-prefix-map="; then + echo "-ffile-prefix-map=${S}=/kernel-source/" fi - echo $cc_extra } kernel_do_compile() {