backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] backports: suppress errors from 'make kernelversion'
@ 2021-05-04 21:12 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2021-05-04 21:12 UTC (permalink / raw)
  To: backports; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Since kernel 5.8, specifically commit 4d0831e8a029 ("kconfig: unify
cc-option and as-option"), 'make kernelversion' will call into the
Kconfig system, evaluating cc-option from scripts/Kconfig.include,
which requires a writable current working directory due to the use
of ".tmp_<pid>" for temporary files.

This was fixed upstream in commit 805b2e1d427a ("kbuild: include
Makefile.compiler only when compiler is needed").

To work around it, pass M= as suggested here:
https://lore.kernel.org/r/CAK7LNAROdVMPQq4Qn_M=OWzJrfqNOc4fyMicNKdnCqu7G9rFgw@mail.gmail.com

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/backport/Makefile b/backport/Makefile
index ee7df4ba29ce..77c2670d637e 100644
--- a/backport/Makefile
+++ b/backport/Makefile
@@ -84,8 +84,8 @@ mrproper:
 				echo ""							;\
 			done								\
 		) > Kconfig.kernel							;\
-		kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) kernelversion |	\
-			sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d')		;\
+		kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) M=$(BACKPORT_DIR)	\
+			kernelversion |	sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\
 		test "$$kver" != "" || echo "Kernel version parse failed!"		;\
 		test "$$kver" != ""							;\
 		kvers="$$(seq 14 39 | sed 's/^/2.6./')"					;\
-- 
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-04 21:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 21:12 [PATCH v2] backports: suppress errors from 'make kernelversion' Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).