]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kbuild: install-extmod-build: Properly fix CC expansion when ccache is used
authorAbel Vesa <abel.vesa@linaro.org>
Tue, 11 Nov 2025 06:43:51 +0000 (08:43 +0200)
committerNathan Chancellor <nathan@kernel.org>
Wed, 12 Nov 2025 05:31:34 +0000 (22:31 -0700)
commit4ab2ee307983548b29ddaab0ecaef82d526cf4c9
tree9e82b5af6498e32e9578e8d1588b8914bd56f3cf
parente9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c
kbuild: install-extmod-build: Properly fix CC expansion when ccache is used

Currently, when cross-compiling and ccache is used, the expanding of CC
turns out to be without any quotes, leading to the following error:

make[4]: *** No rule to make target 'aarch64-linux-gnu-gcc'.  Stop.
make[3]: *** [Makefile:2164: run-command] Error 2

And it makes sense, because after expansion it ends up like this:

make run-command KBUILD_RUN_COMMAND=+$(MAKE) \
HOSTCC=ccache aarch64-linux-gnu-gcc VPATH= srcroot=. $(build)= ...

So add another set of double quotes to surround whatever CC expands to
to make sure the aarch64-linux-gnu-gcc isn't expanded to something that
looks like an entirely separate target.

Fixes: 140332b6ed72 ("kbuild: fix linux-headers package build when $(CC) cannot link userspace")
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20251111-kbuild-install-extmod-build-fix-cc-expand-third-try-v2-1-15ba1b37e71a@linaro.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
scripts/package/install-extmod-build