]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel.bbclass: external toolchain fix
authorJuro Bystricky <juro.bystricky@intel.com>
Sat, 19 Aug 2017 16:41:35 +0000 (09:41 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Aug 2017 07:47:05 +0000 (08:47 +0100)
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>
meta/classes/kernel.bbclass

index 2a765547acecc7741229af53861894efcc62c589..3cc0432fcf3c034a135c23409c59a62b763d4967 100644 (file)
@@ -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() {