]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel.bbclass: fix INC directory for SLANG
authorLiang Li <liang.li@windriver.com>
Wed, 22 Aug 2012 08:02:33 +0000 (16:02 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 25 Aug 2012 13:44:00 +0000 (14:44 +0100)
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.

Signed-off-by: Liang Li <liang.li@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/kernel.bbclass
meta/recipes-kernel/linux/linux-yocto/noslang.patch [deleted file]
meta/recipes-kernel/linux/linux-yocto_3.0.bb
meta/recipes-kernel/linux/linux-yocto_3.2.bb
meta/recipes-kernel/linux/linux-yocto_3.4.bb

index f34e63263aaacad19dd64c6648325c1d03f1df3f..fdef1bea97cdaf26e9f595d76904f5d1e63ca221 100644 (file)
@@ -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() {
diff --git a/meta/recipes-kernel/linux/linux-yocto/noslang.patch b/meta/recipes-kernel/linux/linux-yocto/noslang.patch
deleted file mode 100644 (file)
index 9cada34..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-We (OE) install slang into /usr/include so we never need to look into 
-/usr/include/slang/. We never want to look into a hardcoded path like this
-since it triggers host infection issues. For now, simply remove this
-since it causes us problems.
-
-Upstream-Status: Pending (would need rework)
-
-Index: tools/perf/Makefile
-===================================================================
---- linux.orig/tools/perf/Makefile     2012-08-07 10:29:43.020149620 +0000
-+++ linux/tools/perf/Makefile  2012-08-07 10:30:08.128148098 +0000
-@@ -504,7 +504,7 @@
-               BASIC_CFLAGS += -DNO_NEWT_SUPPORT
-       else
-               # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
--              BASIC_CFLAGS += -I/usr/include/slang
-+              # BASIC_CFLAGS += -I/usr/include/slang
-               EXTLIBS += -lnewt -lslang
-               LIB_OBJS += $(OUTPUT)util/ui/setup.o
-               LIB_OBJS += $(OUTPUT)util/ui/browser.o
index 4d19664f151d625ce83f6806ce4775684b330075..d16cdf0dc270910e2b40808aa9444352c07be36e 100644 (file)
@@ -19,13 +19,11 @@ SRCREV_machine_qemux86-64 ?= "fe23c7dd94eb94dd5887028683093615ac921086"
 SRCREV_machine ?= "cef17a18d72eae749dc78de3c83772f52815d842"
 SRCREV_meta ?= "bf5ee4945ee6d748e6abe16356f2357f76b5e2f0"
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.0;protocol=git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
 
-SRC_URI += "file://noslang.patch"
-
 COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"
 
 # Functionality flags
index c3fb2521aaac068af3d8b1f326cb94585174cb7a..b17e479802951a1df0dc9570c04b0cd049b056f9 100644 (file)
@@ -17,15 +17,13 @@ SRCREV_machine_qemux86-64 ?= "f3625121d459b8e38f7528c2f5d2feb6078d0de9"
 SRCREV_machine ?= "7cc31a952f78b8f8e8469eed93c23e9675a8eeb5"
 SRCREV_meta ?= "486f7aec824b4127e91ef53228823e996b3696f0"
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 KMETA = "meta"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.2;protocol=git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
 
-SRC_URI += "file://noslang.patch"
-
 COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"
 
 # Functionality flags
index 691d78968a69b5d332f79d84112d1c1e67492601..440deef57ea58bcdefd19c182fe5cd327ccc21b1 100644 (file)
@@ -13,11 +13,9 @@ SRCREV_meta ?= "28bcd46af1d592dab39bd8a0891c872454fde8bc"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"
 
-SRC_URI += "file://noslang.patch"
-
 LINUX_VERSION ?= "3.4.7"
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 KMETA = "meta"