Skip to content

Commit 5ff90d4

Browse files
chewinathanchance
authored andcommitted
kbuild: install-extmod-build: Fix when given dir outside the build dir
Commit b5e3956 ("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: b5e3956 ("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>
1 parent dfab678 commit 5ff90d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/package/install-extmod-build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if [ "${CC}" != "${HOSTCC}" ]; then
6363
# Clear VPATH and srcroot because the source files reside in the output
6464
# directory.
6565
# shellcheck disable=SC2016 # $(MAKE) and $(build) will be expanded by Make
66-
"${MAKE}" run-command KBUILD_RUN_COMMAND='+$(MAKE) HOSTCC='"${CC}"' VPATH= srcroot=. $(build)='"$(realpath --relative-base=. "${destdir}")"/scripts
66+
"${MAKE}" run-command KBUILD_RUN_COMMAND='+$(MAKE) HOSTCC='"${CC}"' VPATH= srcroot=. $(build)='"$(realpath --relative-to=. "${destdir}")"/scripts
6767

6868
rm -f "${destdir}/scripts/Kbuild"
6969
fi

0 commit comments

Comments
 (0)