Skip to contentSkip to conversation

kernel.bbclass: fix INC directory for SLANG

PATCH In review Bruce Ashfield 3 participants 6 messages Aug 24, 2012 – Aug 27, 2012

lore
Share & tools
lore
#0 lore raw

cover kernel.bbclass: fix INC directory for SLANG

Richard/Saul,

Here's the perf slang fix implemented in the kernel.bbclass. I've removed the old noslang patch, and built perf here. Everything seems sane.

The kernel patch portion (that isn't required to fix the build issue), will come tomorrow along with some other kernel updates.

Take this for a spin, but it should solve everyone's problems with perf and slang.

Cheers,

Bruce

The following changes since commit a865fbf423defb7d24c59ae8d7a79eb87e2e6a02:

kernel-yocto: set master branch to a defined SRCREV (2012-08-23 15:35:35 -0400)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib zedd/kernel-perf
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel-perf

Liang Li (1):
kernel.bbclass: fix INC directory for SLANG

 meta/classes/kernel.bbclass                        |    3 +++
 .../recipes-kernel/linux/linux-yocto/noslang.patch |   20 --------------------
 meta/recipes-kernel/linux/linux-yocto_3.0.bb       |    2 --
 meta/recipes-kernel/linux/linux-yocto_3.2.bb       |    2 --
 meta/recipes-kernel/linux/linux-yocto_3.4.bb       |    2 --
 5 files changed, 3 insertions(+), 26 deletions(-)
 delete mode 100644 meta/recipes-kernel/linux/linux-yocto/noslang.patch
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 kernel.bbclass: fix INC directory for SLANG

From: Liang Li <[email protected]>

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.

---
 meta/classes/kernel.bbclass                        |    3 +++
 .../recipes-kernel/linux/linux-yocto/noslang.patch |   20 --------------------
 meta/recipes-kernel/linux/linux-yocto_3.0.bb       |    2 --
 meta/recipes-kernel/linux/linux-yocto_3.2.bb       |    2 --
 meta/recipes-kernel/linux/linux-yocto_3.4.bb       |    2 --
 5 files changed, 3 insertions(+), 26 deletions(-)
 delete mode 100644 meta/recipes-kernel/linux/linux-yocto/noslang.patch
meta/classes/kernel.bbclass +3 -0
index f34e632..fdef1be 100644
@@ -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() {
meta/recipes-kernel/linux/linux-yocto/noslang.patch deleted +0 -20
deleted file mode 100644
index 9cada34..0000000
@@ -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
meta/recipes-kernel/linux/linux-yocto_3.0.bb +0 -2
index 4d19664..b9e5036 100644
@@ -24,8 +24,6 @@ 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
meta/recipes-kernel/linux/linux-yocto_3.2.bb +0 -2
index c3fb252..6a162dd 100644
@@ -24,8 +24,6 @@ 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
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -2
index 691d789..6fa4920 100644
@@ -13,8 +13,6 @@ 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"
Signature · 1 line
1.7.5.4
#2 lore raw
Quoted 104 lines · Bruce Ashfield

From: Liang Li <[email protected]>

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.

---
  meta/classes/kernel.bbclass                        |    3 +++
  .../recipes-kernel/linux/linux-yocto/noslang.patch |   20 --------------------
  meta/recipes-kernel/linux/linux-yocto_3.0.bb       |    2 --
  meta/recipes-kernel/linux/linux-yocto_3.2.bb       |    2 --
  meta/recipes-kernel/linux/linux-yocto_3.4.bb       |    2 --
  5 files changed, 3 insertions(+), 26 deletions(-)

delete mode 100644 meta/recipes-kernel/linux/linux-yocto/noslang.patch

meta/classes/kernel.bbclass +3 -0
index f34e632..fdef1be 100644
@@ -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() {
meta/recipes-kernel/linux/linux-yocto/noslang.patch deleted +0 -20
deleted file mode 100644
index 9cada34..0000000
@@ -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
meta/recipes-kernel/linux/linux-yocto_3.0.bb +0 -2
index 4d19664..b9e5036 100644
@@ -24,8 +24,6 @@ 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
meta/recipes-kernel/linux/linux-yocto_3.2.bb +0 -2
index c3fb252..6a162dd 100644
@@ -24,8 +24,6 @@ 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
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -0
index 691d789..6fa4920 100644

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_meta ?= "28bcd46af1d592dab39bd8a0891c872454fde8bc" · line 18

Quoted 8 lines
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -2
@@ -13,8 +13,6 @@ 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"

Is a PR bump needed here?

Sau!

#3 lore raw
Quoted 121 lines · Saul Wold
Quoted 120 lines · Bruce Ashfield

From: Liang Li <[email protected]>

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.

---
  meta/classes/kernel.bbclass                        |    3 +++
  .../recipes-kernel/linux/linux-yocto/noslang.patch |   20
--------------------
  meta/recipes-kernel/linux/linux-yocto_3.0.bb       |    2 --
  meta/recipes-kernel/linux/linux-yocto_3.2.bb       |    2 --
  meta/recipes-kernel/linux/linux-yocto_3.4.bb       |    2 --
  5 files changed, 3 insertions(+), 26 deletions(-)

delete mode 100644 meta/recipes-kernel/linux/linux-yocto/noslang.patch

meta/classes/kernel.bbclass +3 -0
index f34e632..fdef1be 100644
@@ -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() {
meta/recipes-kernel/linux/linux-yocto/noslang.patch deleted +0 -2
deleted file mode 100644
index 9cada34..0000000
@@ -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

meta/recipes-kernel/linux/linux-yocto/noslang.patch deleted +1 -13
-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

meta/recipes-kernel/linux/linux-yocto/noslang.patch deleted +0 -3
-               EXTLIBS += -lnewt -lslang
-               LIB_OBJS += $(OUTPUT)util/ui/setup.o
-               LIB_OBJS += $(OUTPUT)util/ui/browser.o
meta/recipes-kernel/linux/linux-yocto_3.0.bb +0 -0
index 4d19664..b9e5036 100644
@@ -24,8 +24,6 @@ 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"

meta/recipes-kernel/linux/linux-yocto_3.0.bb +0 -2
-SRC_URI += "file://noslang.patch"
-
  COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"
 
  # Functionality flags
meta/recipes-kernel/linux/linux-yocto_3.2.bb +0 -0
index c3fb252..6a162dd 100644
@@ -24,8 +24,6 @@ KMETA = "meta"
 
  SRC_URI =

"git://git.yoctoproject.org/linux-yocto-3.2;protocol=git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"

meta/recipes-kernel/linux/linux-yocto_3.2.bb +0 -2
-SRC_URI += "file://noslang.patch"
-
  COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"
 
  # Functionality flags
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -0
index 691d789..6fa4920 100644
@@ -13,8 +13,6 @@ SRCREV_meta ?=

"28bcd46af1d592dab39bd8a0891c872454fde8bc"

SRC_URI =
"git://git.yoctoproject.org/linux-yocto-3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"

Quoted 7 lines

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_meta ?= "28bcd46af1d592dab39bd8a0891c872454fde8bc" · line 18

Quoted 6 lines
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -2
-SRC_URI += "file://noslang.patch"
-
  LINUX_VERSION ?= "3.4.7"
 
  PR = "${INC_PR}.0"

Is a PR bump needed here?

I'm not sure. We don't bump it with every SRCREV update, so I wasn't sure if it needed one.

That being said, there's no SRCREV update associated with this (that's another patch), so it probably does need one. I can re-push with the bump.

Bruce

Quoted 9 lines

Sau!

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#4 lore raw
In reply to Saul Wold
Quoted 122 lines · Saul Wold
Quoted 121 lines · Bruce Ashfield

From: Liang Li <[email protected]>

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.

---
meta/classes/kernel.bbclass | 3 +++ .../recipes-kernel/linux/linux-yocto/noslang.patch | 20
--------------------

meta/recipes-kernel/linux/linux-yocto_3.0.bb | 2 --
meta/recipes-kernel/linux/linux-yocto_3.2.bb | 2 --
meta/recipes-kernel/linux/linux-yocto_3.4.bb | 2 --
5 files changed, 3 insertions(+), 26 deletions(-)

delete mode 100644 meta/recipes-kernel/linux/linux-yocto/noslang.patch

meta/classes/kernel.bbclass +0 -0
index f34e632..fdef1be 100644
@@ -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() {

meta/recipes-kernel/linux/linux-yocto/noslang.patch deleted +0 -2
deleted file mode 100644
index 9cada34..0000000
@@ -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

meta/recipes-kernel/linux/linux-yocto/noslang.patch deleted +0 -13
-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

meta/recipes-kernel/linux/linux-yocto_3.0.bb +0 -0
index 4d19664..b9e5036 100644
@@ -24,8 +24,6 @@ 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"

meta/recipes-kernel/linux/linux-yocto_3.0.bb +0 -2
-SRC_URI += "file://noslang.patch"
-

COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"

# Functionality flags

meta/recipes-kernel/linux/linux-yocto_3.2.bb +0 -0
index c3fb252..6a162dd 100644
@@ -24,8 +24,6 @@ KMETA = "meta"
 

SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.2;protocol=git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"

meta/recipes-kernel/linux/linux-yocto_3.2.bb +0 -2
-SRC_URI += "file://noslang.patch"
-

COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"

# Functionality flags

meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -0
index 691d789..6fa4920 100644
@@ -13,8 +13,6 @@ SRCREV_meta ?=

"28bcd46af1d592dab39bd8a0891c872454fde8bc"

SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"

Quoted 7 lines
Quoted 6 lines
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -2
-SRC_URI += "file://noslang.patch"
-

LINUX_VERSION ?= "3.4.7"

PR = "${INC_PR}.0"

Is a PR bump needed here?

Same branch has been updated with PR = "${INC_PR}.1" for the three kernel recipes.

Cheers,

Bruce

Quoted 3 lines

Sau!

#5 lore raw
In reply to Bruce Ashfield
Quoted 26 lines · Bruce Ashfield

Richard/Saul,

Here's the perf slang fix implemented in the kernel.bbclass. I've removed the old noslang patch, and built perf here. Everything seems sane.

The kernel patch portion (that isn't required to fix the build issue), will come tomorrow along with some other kernel updates.

Take this for a spin, but it should solve everyone's problems with perf and slang.

Cheers,

Bruce

The following changes since commit a865fbf423defb7d24c59ae8d7a79eb87e2e6a02:

kernel-yocto: set master branch to a defined SRCREV (2012-08-23 15:35:35 -0400)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib zedd/kernel-perf
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel-perf

Liang Li (1):
kernel.bbclass: fix INC directory for SLANG

Quoted 8 lines
  meta/classes/kernel.bbclass                        |    3 +++
  .../recipes-kernel/linux/linux-yocto/noslang.patch |   20 --------------------
  meta/recipes-kernel/linux/linux-yocto_3.0.bb       |    2 --
  meta/recipes-kernel/linux/linux-yocto_3.2.bb       |    2 --
  meta/recipes-kernel/linux/linux-yocto_3.4.bb       |    2 --
  5 files changed, 3 insertions(+), 26 deletions(-)

delete mode 100644 meta/recipes-kernel/linux/linux-yocto/noslang.patch

Merged the updated version with PR Bump

Thanks
Sau!