]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Mar 2023 13:32:14 +0000 (14:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Mar 2023 13:32:14 +0000 (14:32 +0100)
added patches:
kbuild-port-silent-mode-detection-to-future-gnu-make.patch

queue-4.19/kbuild-port-silent-mode-detection-to-future-gnu-make.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/kbuild-port-silent-mode-detection-to-future-gnu-make.patch b/queue-4.19/kbuild-port-silent-mode-detection-to-future-gnu-make.patch
new file mode 100644 (file)
index 0000000..a2281c6
--- /dev/null
@@ -0,0 +1,73 @@
+From 4bf73588165ba7d32131a043775557a54b6e1db5 Mon Sep 17 00:00:00 2001
+From: Dmitry Goncharov <dgoncharov@users.sf.net>
+Date: Mon, 5 Dec 2022 16:48:19 -0500
+Subject: kbuild: Port silent mode detection to future gnu make.
+
+From: Dmitry Goncharov <dgoncharov@users.sf.net>
+
+commit 4bf73588165ba7d32131a043775557a54b6e1db5 upstream.
+
+Port silent mode detection to the future (post make-4.4) versions of gnu make.
+
+Makefile contains the following piece of make code to detect if option -s is
+specified on the command line.
+
+ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),)
+
+This code is executed by make at parse time and assumes that MAKEFLAGS
+does not contain command line variable definitions.
+Currently if the user defines a=s on the command line, then at build only
+time MAKEFLAGS contains " -- a=s".
+However, starting with commit dc2d963989b96161472b2cd38cef5d1f4851ea34
+MAKEFLAGS contains command line definitions at both parse time and
+build time.
+
+This '-s' detection code then confuses a command line variable
+definition which contains letter 's' with option -s.
+
+$ # old make
+$ make net/wireless/ocb.o a=s
+  CALL    scripts/checksyscalls.sh
+  DESCEND objtool
+$ # this a new make which defines makeflags at parse time
+$ ~/src/gmake/make/l64/make net/wireless/ocb.o a=s
+$
+
+We can see here that the letter 's' from 'a=s' was confused with -s.
+
+This patch checks for presence of -s using a method recommended by the
+make manual here
+https://www.gnu.org/software/make/manual/make.html#Testing-Flags.
+
+Link: https://lists.gnu.org/archive/html/bug-make/2022-11/msg00190.html
+Reported-by: Jan Palus <jpalus+gnu@fastmail.com>
+Signed-off-by: Dmitry Goncharov <dgoncharov@users.sf.net>
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Makefile |   13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -88,10 +88,17 @@ endif
+ # If the user is running make -s (silent mode), suppress echoing of
+ # commands
++# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
+-ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),)
+-  quiet=silent_
+-  tools_silent=s
++ifeq ($(filter 3.%,$(MAKE_VERSION)),)
++silence:=$(findstring s,$(firstword -$(MAKEFLAGS)))
++else
++silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS)))
++endif
++
++ifeq ($(silence),s)
++quiet=silent_
++tools_silent=s
+ endif
+ export quiet Q KBUILD_VERBOSE
index a50067060f974e9c6344d1986f548e6bbc84b9c8..e3c8a8a7a6a00e9ecbe5a29ae803632e1782bfc7 100644 (file)
@@ -194,3 +194,4 @@ scsi-ses-fix-slab-out-of-bounds-in-ses_intf_remove.patch
 pci-avoid-flr-for-amd-fch-ahci-adapters.patch
 drm-radeon-fix-edp-for-single-display-imac11-2.patch
 wifi-ath9k-use-proper-statements-in-conditionals.patch
+kbuild-port-silent-mode-detection-to-future-gnu-make.patch