From: Greg Kroah-Hartman Date: Wed, 13 Jun 2018 14:58:36 +0000 (+0200) Subject: 3.18-stable patches X-Git-Tag: v4.17.2~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f17824c753c479c15b1855e9b3a4a8bc371a2f57;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: tools-build-fix-makefile-s-to-properly-invoke-tools-build.patch tools-build-no-need-to-make-libapi-for-perf-explicitly.patch --- diff --git a/queue-3.18/series b/queue-3.18/series new file mode 100644 index 00000000000..93e933cfbaa --- /dev/null +++ b/queue-3.18/series @@ -0,0 +1,2 @@ +tools-build-no-need-to-make-libapi-for-perf-explicitly.patch +tools-build-fix-makefile-s-to-properly-invoke-tools-build.patch diff --git a/queue-3.18/tools-build-fix-makefile-s-to-properly-invoke-tools-build.patch b/queue-3.18/tools-build-fix-makefile-s-to-properly-invoke-tools-build.patch new file mode 100644 index 00000000000..0d7b81f14e3 --- /dev/null +++ b/queue-3.18/tools-build-fix-makefile-s-to-properly-invoke-tools-build.patch @@ -0,0 +1,95 @@ +From 16671c1e1cac2dbb995feb4bc55082fd939b5c2c Mon Sep 17 00:00:00 2001 +From: Jiri Olsa +Date: Sat, 18 Apr 2015 22:34:39 +0200 +Subject: tools build: Fix Makefile(s) to properly invoke tools build + +From: Jiri Olsa + +commit 16671c1e1cac2dbb995feb4bc55082fd939b5c2c upstream. + +Several fixes were needed to allow following builds: + $ make tools/tmon + $ make -C tools/perf + $ make -C /tools perf + + - some of the tools (perf) use same make variables as in + kernel build, unsetting srctree and objtree + - using original $(O) for O variable + - perf build does not follow the descend function setup + invoking it via it's own make rule + +I tried the rest of the tools/Makefile targets and they +seem to work now. + +Reported-by: Brian Norris +Signed-off-by: Jiri Olsa +Cc: Borislav Petkov +Cc: Brian Norris +Cc: David Ahern +Cc: David Howells +Cc: Michal Marek +Cc: Namhyung Kim +Cc: Paul Mackerras +Cc: Peter Zijlstra +Cc: Sam Ravnborg +Cc: linux-kbuild@vger.kernel.org +Link: http://lkml.kernel.org/r/1429389280-18720-3-git-send-email-jolsa@kernel.org +Signed-off-by: Arnaldo Carvalho de Melo +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + Makefile | 5 ++--- + tools/Makefile | 12 +++++++++++- + 2 files changed, 13 insertions(+), 4 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -214,7 +214,6 @@ VPATH := $(srctree)$(if $(KBUILD_EXTMOD + + export srctree objtree VPATH + +- + # SUBARCH tells the usermode build what the underlying arch is. That is set + # first, and if a usermode build is happening, the "ARCH=um" on the command + # line overrides the setting of ARCH below. If a native build is happening, +@@ -1505,11 +1504,11 @@ image_name: + # Clear a bunch of variables before executing the submake + tools/: FORCE + $(Q)mkdir -p $(objtree)/tools +- $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(objtree) subdir=tools -C $(src)/tools/ ++ $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/ + + tools/%: FORCE + $(Q)mkdir -p $(objtree)/tools +- $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(objtree) subdir=tools -C $(src)/tools/ $* ++ $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/ $* + + # Single targets + # --------------------------------------------------------------------------- +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -1,3 +1,8 @@ ++# Some of the tools (perf) use same make variables ++# as in kernel build. ++export srctree= ++export objtree= ++ + include scripts/Makefile.include + + help: +@@ -54,8 +59,13 @@ liblockdep: FORCE + libapi: FORCE + $(call descend,lib/api) + ++# The perf build does not follow the descend function setup, ++# invoking it via it's own make rule. ++PERF_O = $(if $(O),$(O)/tools/perf,) ++ + perf: FORCE +- $(call descend,$@) ++ $(Q)mkdir -p $(PERF_O) . ++ $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= + + selftests: FORCE + $(call descend,testing/$@) diff --git a/queue-3.18/tools-build-no-need-to-make-libapi-for-perf-explicitly.patch b/queue-3.18/tools-build-no-need-to-make-libapi-for-perf-explicitly.patch new file mode 100644 index 00000000000..41eccfb88f3 --- /dev/null +++ b/queue-3.18/tools-build-no-need-to-make-libapi-for-perf-explicitly.patch @@ -0,0 +1,62 @@ +From 379a9a28a1b4364ab08fec35c84d39cf4995c509 Mon Sep 17 00:00:00 2001 +From: Jiri Olsa +Date: Sat, 18 Apr 2015 22:34:38 +0200 +Subject: tools build: No need to make libapi for perf explicitly + +From: Jiri Olsa + +commit 379a9a28a1b4364ab08fec35c84d39cf4995c509 upstream. + +The perf build handles its dependencies by itself. + +Also renaming libapi libapikfs to libapi as it got +changed just recently. + +Signed-off-by: Jiri Olsa +Cc: Borislav Petkov +Cc: Brian Norris +Cc: David Ahern +Cc: David Howells +Cc: Michal Marek +Cc: Namhyung Kim +Cc: Paul Mackerras +Cc: Peter Zijlstra +Cc: Sam Ravnborg +Cc: linux-kbuild@vger.kernel.org +Link: http://lkml.kernel.org/r/1429389280-18720-2-git-send-email-jolsa@kernel.org +Signed-off-by: Arnaldo Carvalho de Melo +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + tools/Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -51,10 +51,10 @@ cgroup firewire hv guest usb virtio vm n + liblockdep: FORCE + $(call descend,lib/lockdep) + +-libapikfs: FORCE ++libapi: FORCE + $(call descend,lib/api) + +-perf: libapikfs FORCE ++perf: FORCE + $(call descend,$@) + + selftests: FORCE +@@ -106,10 +106,10 @@ cgroup_clean hv_clean firewire_clean lgu + liblockdep_clean: + $(call descend,lib/lockdep,clean) + +-libapikfs_clean: ++libapi_clean: + $(call descend,lib/api,clean) + +-perf_clean: libapikfs_clean ++perf_clean: + $(call descend,$(@:_clean=),clean) + + selftests_clean: diff --git a/queue-4.9/series b/queue-4.9/series new file mode 100644 index 00000000000..e69de29bb2d