Skip to contentSkip to conversation

perf_3.4.bb: update to build against older kernels

PATCH Applied Matthew McClintock 2 participants 2 messages Aug 17, 2012 – Aug 20, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf_3.4.bb: update to build against older kernels

Removes a make install-python_ext when not present since older versions of perf lack this install rule

This also fixes a library issue on older kernels building with a newer toolchain where libaries that would previously be pulled in are no longer. So we add them manually.

---
 meta/recipes-kernel/perf/perf_3.4.bb |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-kernel/perf/perf_3.4.bb +3 -1
index 505c7b8..5fb38e6 100644
@@ -54,6 +54,7 @@ B = "${WORKDIR}/${BPN}-${PV}"
 SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
 TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}"
 
+export LDFLAGS = "-ldl -lutil"
 EXTRA_OEMAKE = \
 		'-C ${S}/tools/perf \
 		O=${B} \
@@ -71,7 +72,8 @@ do_compile() {
 
 do_install() {
 	oe_runmake DESTDIR=${D} install
-	if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ]; then
+	# we are checking for this make target to be compatible with older perf versions
+	if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0"]; then
 		oe_runmake DESTDIR=${D} install-python_ext
 	fi
 }
Signature · 1 line
1.7.9.7
Applied
#1 lore raw
Quoted 26 lines · Matthew McClintock

Removes a make install-python_ext when not present since older versions of perf lack this install rule

This also fixes a library issue on older kernels building with a newer toolchain where libaries that would previously be pulled in are no longer. So we add them manually.

---
  meta/recipes-kernel/perf/perf_3.4.bb |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-kernel/perf/perf_3.4.bb +1 -0
index 505c7b8..5fb38e6 100644
@@ -54,6 +54,7 @@ B = "${WORKDIR}/${BPN}-${PV}"
  SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
  TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}"
 
+export LDFLAGS = "-ldl -lutil"
  EXTRA_OEMAKE = \
  		'-C ${S}/tools/perf \
  		O=${B} \

meta/recipes-kernel/perf/perf_3.4.bb do_compile() { · line 79

Quoted 9 lines
meta/recipes-kernel/perf/perf_3.4.bb +2 -1
@@ -71,7 +72,8 @@ do_compile() {
 
  do_install() {
  	oe_runmake DESTDIR=${D} install
-	if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ]; then
+	# we are checking for this make target to be compatible with older perf versions
+	if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0"]; then
  		oe_runmake DESTDIR=${D} install-python_ext
  	fi
  }

Merged into OE-Core

Thanks
Sau!