From 381aff2693c6168845c54644a9b8ea39cde898bf Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 8 Mar 2023 14:32:45 +0100 Subject: [PATCH] 5.10-stable patches added patches: kbuild-port-silent-mode-detection-to-future-gnu-make.patch --- ...nt-mode-detection-to-future-gnu-make.patch | 71 +++++++++++++++++++ queue-5.10/series | 1 + 2 files changed, 72 insertions(+) create mode 100644 queue-5.10/kbuild-port-silent-mode-detection-to-future-gnu-make.patch diff --git a/queue-5.10/kbuild-port-silent-mode-detection-to-future-gnu-make.patch b/queue-5.10/kbuild-port-silent-mode-detection-to-future-gnu-make.patch new file mode 100644 index 00000000000..c39ee66ac21 --- /dev/null +++ b/queue-5.10/kbuild-port-silent-mode-detection-to-future-gnu-make.patch @@ -0,0 +1,71 @@ +From 4bf73588165ba7d32131a043775557a54b6e1db5 Mon Sep 17 00:00:00 2001 +From: Dmitry Goncharov +Date: Mon, 5 Dec 2022 16:48:19 -0500 +Subject: kbuild: Port silent mode detection to future gnu make. + +From: Dmitry Goncharov + +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 +Signed-off-by: Dmitry Goncharov +Signed-off-by: Masahiro Yamada +Signed-off-by: Greg Kroah-Hartman +--- + Makefile | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -93,9 +93,16 @@ 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_ ++ifeq ($(filter 3.%,$(MAKE_VERSION)),) ++silence:=$(findstring s,$(firstword -$(MAKEFLAGS))) ++else ++silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS))) ++endif ++ ++ifeq ($(silence),s) ++quiet=silent_ + endif + + export quiet Q KBUILD_VERBOSE diff --git a/queue-5.10/series b/queue-5.10/series index d7f4fcf5e0a..a9b313ad14c 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -429,3 +429,4 @@ arm64-dts-qcom-ipq8074-fix-gen2-pcie-qmp-phy.patch wifi-ath9k-use-proper-statements-in-conditionals.patch pinctrl-rockchip-fix-mux-route-data-for-rk3568.patch pinctrl-rockchip-fix-reading-pull-type-on-rk3568.patch +kbuild-port-silent-mode-detection-to-future-gnu-make.patch -- 2.47.3