From 9a1705ef805b0b5a8e8bf2986a521bf5f29e4556 Mon Sep 17 00:00:00 2001 From: Liang Li Date: Wed, 22 Aug 2012 16:02:33 +0800 Subject: kernel.bbclass: fix INC directory for SLANG In the kernel's tools/perf/Makefile CFLAGS was previously hard coded to contain "-I/usr/include/slang" to work with hosts that have "/usr/include/slang/slang.h" as well as hosts that have "/usr/include/slang.h". This path can cause compile warnings like: cc1: warning: '/usr/include/slang' doesn't exists. or cc1: warning: include location "/usr/include/slang" is unsafe for cross-compilation [-Wpoison-system-directories] Then in some cases warnings become errors if WERROR is enabled hence build errors. In coordination with a kernel fix, we can fix this error for all kernels by modifying the perf Makefile within the staged kernel source. (From OE-Core rev: 4e0daf05ed04e9fb4343032c6290a379f53b89f3) Signed-off-by: Liang Li Signed-off-by: Bruce Ashfield Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/classes/kernel.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meta/classes') diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index f34e63263a..fdef1bea97 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -204,6 +204,9 @@ kernel_do_install() { for entry in $bin_files; do rm -f $kerneldir/$entry done + + # Fix SLANG_INC for slang.h + sed -i 's#-I/usr/include/slang#-I=/usr/include/slang#g' $kerneldir/tools/perf/Makefile } sysroot_stage_all_append() { -- cgit v1.2.3-54-g00ecf