diff --git a/meta-oe/recipes-kernel/turbostat/turbostat.bb b/meta-oe/recipes-kernel/turbostat/turbostat.bb index fcd1b116b8..2e69f9604a 100644 --- a/meta-oe/recipes-kernel/turbostat/turbostat.bb +++ b/meta-oe/recipes-kernel/turbostat/turbostat.bb @@ -59,6 +59,9 @@ do_configure:prepend() { cp -r ${STAGING_KERNEL_DIR}/tools/include/linux/compiler.h ${S} cp -r ${STAGING_KERNEL_DIR}/tools/include/linux/compiler_types.h ${S} cp -r ${STAGING_KERNEL_DIR}/tools/include/linux/compiler-gcc.h ${S} + if [ -f "${STAGING_KERNEL_DIR}/tools/include/linux/compiler-context-analysis.h" ]; then + cp -r ${STAGING_KERNEL_DIR}/tools/include/linux/compiler-context-analysis.h ${S} + fi cp -r ${STAGING_KERNEL_DIR}/tools/power/x86/turbostat/* ${S} } @@ -68,8 +71,9 @@ do_compile() { sed -i 's##"compiler.h"#' build_bug.h sed -i 's##"compiler_types.h"#' compiler.h sed -i 's##"compiler-gcc.h"#' compiler_types.h - 'TMPCHECK='grep "" bits.h'' || true - if [ -n $TMPCHECK ]; then + sed -i 's##"compiler-context-analysis.h"#' compiler_types.h + TMPCHECK=$(grep "" bits.h || true) + if [ -n "$TMPCHECK" ]; then sed -i 's##"const.h"#' bits.h sed -i 's###' const.h else