mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
07348bb76f
commit
06ff0a9c8a
@@ -259,12 +259,9 @@ get_cc_option () {
|
|||||||
# Check if KERNEL_CC supports the option "file-prefix-map".
|
# Check if KERNEL_CC supports the option "file-prefix-map".
|
||||||
# This option allows us to build images with __FILE__ values that do not
|
# This option allows us to build images with __FILE__ values that do not
|
||||||
# contain the host build path.
|
# contain the host build path.
|
||||||
cc_option_supported=`${KERNEL_CC} -Q --help=joined | grep ffile-prefix-map`
|
if ${KERNEL_CC} -Q --help=joined | grep -q "\-ffile-prefix-map=<old=new>"; then
|
||||||
cc_extra=""
|
echo "-ffile-prefix-map=${S}=/kernel-source/"
|
||||||
if [ $cc_option_supported = "-ffile-prefix-map=<old=new>" ]; then
|
|
||||||
cc_extra=-ffile-prefix-map=${S}=/kernel-source/
|
|
||||||
fi
|
fi
|
||||||
echo $cc_extra
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel_do_compile() {
|
kernel_do_compile() {
|
||||||
|
|||||||
Reference in New Issue
Block a user