mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-23 20:58:33 +00:00
turbostat: fix build with kernel 7.x
Since kernel 7.x tools/include/linux/compiler_types.h includes <linux/compiler-context-analysis.h>, a no-op stub for the new compiler-based context analysis annotations. The recipe copies compiler_types.h out of the kernel tree and rewrites its includes to local headers, but did not know about the new one, so the build fails: ./compiler_types.h:16:10: fatal error: 'linux/compiler-context-analysis.h' file not found Copy the new header when the kernel provides it and rewrite the include like the others. While here, fix the mangled quoting on the TMPCHECK line, which produced run.do_compile: line 138: TMPCHECK=grep: command not found and left TMPCHECK unset. The unquoted [ -n $TMPCHECK ] test then always succeeded, so the vdso branch was taken regardless of the grep result. Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
1 parent
fa8c85fb3b
commit
09ec1df384
1 file changed
+6
-2
@@ -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.h ${S}
|
||||||
cp -r ${STAGING_KERNEL_DIR}/tools/include/linux/compiler_types.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}
|
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}
|
cp -r ${STAGING_KERNEL_DIR}/tools/power/x86/turbostat/* ${S}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,8 +71,9 @@ do_compile() {
|
|||||||
sed -i 's#<linux/compiler.h>#"compiler.h"#' build_bug.h
|
sed -i 's#<linux/compiler.h>#"compiler.h"#' build_bug.h
|
||||||
sed -i 's#<linux/compiler_types.h>#"compiler_types.h"#' compiler.h
|
sed -i 's#<linux/compiler_types.h>#"compiler_types.h"#' compiler.h
|
||||||
sed -i 's#<linux/compiler-gcc.h>#"compiler-gcc.h"#' compiler_types.h
|
sed -i 's#<linux/compiler-gcc.h>#"compiler-gcc.h"#' compiler_types.h
|
||||||
'TMPCHECK='grep "<vdso/const.h>" bits.h'' || true
|
sed -i 's#<linux/compiler-context-analysis.h>#"compiler-context-analysis.h"#' compiler_types.h
|
||||||
if [ -n $TMPCHECK ]; then
|
TMPCHECK=$(grep "<vdso/const.h>" bits.h || true)
|
||||||
|
if [ -n "$TMPCHECK" ]; then
|
||||||
sed -i 's#<vdso/const.h>#"const.h"#' bits.h
|
sed -i 's#<vdso/const.h>#"const.h"#' bits.h
|
||||||
sed -i 's#<uapi/linux/const.h>#<linux/const.h>#' const.h
|
sed -i 's#<uapi/linux/const.h>#<linux/const.h>#' const.h
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user