Bug#789269: Linux 4.1 compat
Package: linux-tools
Version: < 4.1
Severity: wishlist
Tags: patch
Following up on #778588, here's a patch to update linux-tools to 4.1.
Makefile.perf needs to either be invoked with NO_LZMA or liblzma-dev
needs to be added to the build deps. I opted for the latter.
The newly added tools-perf-prefix.patch was also submitted upstream
but it may be too late for inclusion in 4.1. We'll see. In any case
it's needed for the release candidates.
Best regards,
Lukas
Index: debian/patches/series
===================================================================
--- debian/patches/series (revision 22738)
+++ debian/patches/series (working copy)
@@ -1,6 +1,7 @@
modpost-symbol-prefix.patch
tools-perf-version.patch
tools-perf-install.patch
+tools-perf-prefix.patch
usbip-document-tcp-wrappers.patch
kbuild-fix-recordmcount-dependency.patch
usbip-include-uninstalled-linux-usbip-h.patch
Index: debian/patches/tools-perf-prefix.patch
===================================================================
--- debian/patches/tools-perf-prefix.patch (revision 0)
+++ debian/patches/tools-perf-prefix.patch (working copy)
@@ -0,0 +1,46 @@
+From 9dbbe6e7b533201668f5d1b72822ba0c8f68a071 Mon Sep 17 00:00:00 2001
+From: Lukas Wunner <lukas@wunner.de>
+Date: Thu, 18 Jun 2015 13:00:32 +0200
+Subject: [PATCH regression 4.0 -> 4.1] tools perf: Fix build breakage if
+ prefix= is specified
+To: Jiri Olsa <jolsa@kernel.org>,
+ Arnaldo Carvalho de Melo <acme@kernel.org>
+Cc: linux-kernel@vger.kernel.org
+
+Invoking Makefile.perf with prefix= breaks the build since Makefile.perf
+hands that variable down to Makefile.build where it overrides
+ prefix := $(subst ./,,$(OUTPUT)$(dir)/)
+
+leading to errors like this:
+ No rule to make target '/usrabspath.o', needed by '/usrlibperf-in.o'
+
+Fixes: c819e2cf2eb6f65d3208d195d7a0edef6108d5
+Signed-off-by: Lukas Wunner <lukas@wunner.de>
+---
+ tools/build/Makefile.build | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
+index 10df572..98cfc38 100644
+--- a/tools/build/Makefile.build
++++ b/tools/build/Makefile.build
+@@ -94,12 +94,12 @@ obj-y := $(patsubst %/, %/$(obj)-in.o, $(obj-y))
+ subdir-obj-y := $(filter %/$(obj)-in.o, $(obj-y))
+
+ # '$(OUTPUT)/dir' prefix to all objects
+-prefix := $(subst ./,,$(OUTPUT)$(dir)/)
+-obj-y := $(addprefix $(prefix),$(obj-y))
+-subdir-obj-y := $(addprefix $(prefix),$(subdir-obj-y))
++objprefix := $(subst ./,,$(OUTPUT)$(dir)/)
++obj-y := $(addprefix $(objprefix),$(obj-y))
++subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
+
+ # Final '$(obj)-in.o' object
+-in-target := $(prefix)$(obj)-in.o
++in-target := $(objprefix)$(obj)-in.o
+
+ PHONY += $(subdir-y)
+
+--
+1.8.5.2 (Apple Git-48)
+
Index: debian/patches/tools-perf-version.patch
===================================================================
--- debian/patches/tools-perf-version.patch (revision 22738)
+++ debian/patches/tools-perf-version.patch (working copy)
@@ -7,18 +7,28 @@
man page title. Install bash_completion script for perf with a
version-dependent name. And do the same for trace.]
+--- a/tools/perf/util/Build
++++ b/tools/perf/util/Build
+@@ -127,6 +127,7 @@
+ CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
+ CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
+ CFLAGS_parse-events.o += -Wno-redundant-decls
++CFLAGS_vdso.o += -DPERFEXECDIR='"$(perfexec_instdir_SQ)"'
+
+ $(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
+ $(call rule_mkdir)
+--- a/tools/perf/config/Makefile
++++ b/tools/perf/config/Makefile
+@@ -704,6 +704,7 @@
+ $(call detected_var,ETC_PERFCONFIG_SQ)
+ $(call detected_var,prefix_SQ)
+ $(call detected_var,perfexecdir_SQ)
++$(call detected_var,perfexec_instdir_SQ)
+ $(call detected_var,LIBDIR)
+ $(call detected_var,GTK_CFLAGS)
+ $(call detected_var,PERL_EMBED_CCOPTS)
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
-@@ -756,6 +756,9 @@ $(OUTPUT)util/find_next_bit.o: ../lib/ut
- $(OUTPUT)util/parse-events.o: util/parse-events.c $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -Wno-redundant-decls $<
-
-+$(OUTPUT)util/vdso.o: util/vdso.c $(OUTPUT)PERF-CFLAGS
-+ $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DPERFEXECDIR='"$(perfexec_instdir_SQ)"' $<
-+
- $(OUTPUT)util/scripting-engines/trace-event-perl.o: util/scripting-engines/trace-event-perl.c $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow -Wno-undef -Wno-switch-default $<
-
@@ -923,18 +926,18 @@ install-gtk:
install-bin: all install-gtk
$(call QUIET_INSTALL, binaries) \
Index: debian/source/options
===================================================================
--- debian/source/options (revision 22738)
+++ debian/source/options (working copy)
@@ -1 +1,2 @@
compression = "xz"
+extend-diff-ignore = "^tools/perf/\.config-detected$"
Index: debian/templates/control.source.in
===================================================================
--- debian/templates/control.source.in (revision 22738)
+++ debian/templates/control.source.in (working copy)
@@ -7,6 +7,6 @@
Build-Depends:
debhelper (>> 7), python,
asciidoc, bison, flex, gcc-multilib [amd64 ppc64 s390x sparc64], libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto,
- autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev
+ autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev, liblzma-dev
Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/
Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/
Reply to: