diff options
| author | James Le Cuirot <chewi@gentoo.org> | 2025-10-16 10:14:17 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-12-18 14:00:08 +0100 |
| commit | 1c507327d4a74f75a1e5b3735c0252efde5e875e (patch) | |
| tree | 0065870d246e78224b4e6dc333167d9ec144160a | |
| parent | 9fed02c16488050cd4e33e045506336b216d7301 (diff) | |
| download | linux-1c507327d4a74f75a1e5b3735c0252efde5e875e.tar.gz linux-1c507327d4a74f75a1e5b3735c0252efde5e875e.tar.bz2 linux-1c507327d4a74f75a1e5b3735c0252efde5e875e.zip | |
kbuild: install-extmod-build: Fix when given dir outside the build dir
[ Upstream commit 5ff90d427ef841fa48608d0c19a81c48d6126d46 ]
Commit b5e395653546 ("kbuild: install-extmod-build: Fix build when
specifying KBUILD_OUTPUT") tried to address the "build" variable
expecting a relative path by using `realpath --relative-base=.`, but
this only works when the given directory is below the current directory.
`realpath --relative-to=.` will return a relative path in all cases.
Fixes: b5e395653546 ("kbuild: install-extmod-build: Fix build when specifying KBUILD_OUTPUT")
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20251016091417.9985-1-chewi@gentoo.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Stable-dep-of: 4ab2ee307983 ("kbuild: install-extmod-build: Properly fix CC expansion when ccache is used")
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rwxr-xr-x | scripts/package/install-extmod-build | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/package/install-extmod-build b/scripts/package/install-extmod-build index b96538787f3d..054fdf45cc37 100755 --- a/scripts/package/install-extmod-build +++ b/scripts/package/install-extmod-build @@ -63,7 +63,7 @@ if [ "${CC}" != "${HOSTCC}" ]; then # Clear VPATH and srcroot because the source files reside in the output # directory. # shellcheck disable=SC2016 # $(MAKE) and $(build) will be expanded by Make - "${MAKE}" run-command KBUILD_RUN_COMMAND='+$(MAKE) HOSTCC='"${CC}"' VPATH= srcroot=. $(build)='"$(realpath --relative-base=. "${destdir}")"/scripts + "${MAKE}" run-command KBUILD_RUN_COMMAND='+$(MAKE) HOSTCC='"${CC}"' VPATH= srcroot=. $(build)='"$(realpath --relative-to=. "${destdir}")"/scripts rm -f "${destdir}/scripts/Kbuild" fi |
