summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2012-08-23 00:44:58 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2012-08-23 00:45:11 -0400
commit99c41dad251d152a693dd714994ffb963bc18599 (patch)
tree83e238eff931d15e80b13bcccd96fe97e2c1f409
parentaa65c7a53d74685ac837aef6713ca5c0582bd52e (diff)
downloadyocto-kernel-cache-yocto-3.5.tar.gz
yocto-kernel-cache-yocto-3.5.tar.bz2
yocto-kernel-cache-yocto-3.5.zip
perf: add SLANG_INC for slang.hyocto-3.5
1/1 [ Author: Liang Li Email: liang.li@windriver.com Subject: perf: add SLANG_INC for slang.h Date: Wed, 22 Aug 2012 16:04:50 +0800 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. To fix this issue, we can use -idirafter to downgrade the priority of the default hard coded path. We can also make the slang include directory a variable, to allow the user to specify SLANG_INC and set their own include location. And add a '=' prefix to indicate better compatibility with sysroot/cross compile cases. Signed-off-by: Liang Li <liang.li@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--features/perf/perf-add-SLANG_INC-for-slang.h.patch51
-rw-r--r--features/perf/perf.scc1
2 files changed, 52 insertions, 0 deletions
diff --git a/features/perf/perf-add-SLANG_INC-for-slang.h.patch b/features/perf/perf-add-SLANG_INC-for-slang.h.patch
new file mode 100644
index 00000000..e50899ec
--- /dev/null
+++ b/features/perf/perf-add-SLANG_INC-for-slang.h.patch
@@ -0,0 +1,51 @@
+From a4c7a048fe3407e8eea0020db4a9c41d3feb8247 Mon Sep 17 00:00:00 2001
+From: Liang Li <liang.li@windriver.com>
+Date: Wed, 22 Aug 2012 16:04:50 +0800
+Subject: [PATCH] perf: add SLANG_INC for slang.h
+
+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.
+
+To fix this issue, we can use -idirafter to downgrade the priority of the
+default hard coded path. We can also make the slang include directory
+a variable, to allow the user to specify SLANG_INC and set their own
+include location. And add a '=' prefix to indicate better
+compatibility with sysroot/cross compile cases.
+
+Signed-off-by: Liang Li <liang.li@windriver.com>
+---
+ tools/perf/Makefile | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/tools/perf/Makefile b/tools/perf/Makefile
+index 15ec207..3262f98 100644
+--- a/tools/perf/Makefile
++++ b/tools/perf/Makefile
+@@ -503,8 +503,10 @@ else
+ msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev);
+ 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
++ # Some releases like Fedora has /usr/include/slang/slang.h other than /usr/include/slang.h
++ SLANG_INC ?= -idirafter =/usr/include/slang
++ BASIC_CFLAGS += $(SLANG_INC)
++
+ EXTLIBS += -lnewt -lslang
+ LIB_OBJS += $(OUTPUT)util/ui/setup.o
+ LIB_OBJS += $(OUTPUT)util/ui/browser.o
+--
+1.7.5.4
+
diff --git a/features/perf/perf.scc b/features/perf/perf.scc
index 554f36c9..2de51057 100644
--- a/features/perf/perf.scc
+++ b/features/perf/perf.scc
@@ -4,3 +4,4 @@ patch perf-use-pkg-config-instead-of-python-config.patch
patch perf-add-libperl-not-found-warning.patch
patch perf-change-root-to-prefix-for-python-install.patch
patch perf-add-sgidefs.h-to-for-mips-builds.patch
+patch perf-add-SLANG_INC-for-slang.h.patch