commit:     ff94210dd4ee1cd7163b788c8164a38ca83c5205
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu May 22 16:01:33 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Jun  5 10:55:06 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff94210d

linux-info.eclass: Pass an empty KBUILD_OUTPUT to make in getfilevar

If KBUILD_OUTPUT is set but doesn't exist, the Makefile will try to
create it, which will probably fail due to permissions issues. We don't
actually want to write anything here, so there is no need to set it.

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 eclass/linux-info.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 42cde638cf27..c395eca9ee85 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -234,10 +234,11 @@ getfilevar() {
                basedname="$(dirname ${2})"
 
                # We use nonfatal because we want the caller to take care of 
things #373151
+               # Pass KBUILD_OUTPUT= because this will probably break if it 
doesn't exist.
                # Pass need-config= to make to avoid config check in kernel 
Makefile.
                # Pass dot-config=0 to avoid the config check in kernels prior 
to 5.4.
                echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \
-                       nonfatal emake -C "${basedname}" --no-print-directory 
M="${T}" \
+                       nonfatal emake -C "${basedname}" --no-print-directory 
M="${T}" KBUILD_OUTPUT= \
                        ARCH="$(tc-arch-kernel)" dot-config=0 need-config= 
need-compiler= -s -f - 2>/dev/null
        fi
 }

Reply via email to