Skip to content

Commit b5e3956

Browse files
inochisamasahir0y
authored andcommitted
kbuild: install-extmod-build: Fix build when specifying KBUILD_OUTPUT
Since commit 5f73e7d ("kbuild: refactor cross-compiling linux-headers package"), the linux-headers pacman package fails to build when "O=" is set. The build system complains: /mnt/chroot/linux/scripts/Makefile.build:41: mnt/chroots/linux-mainline/pacman/linux-upstream/pkg/linux-upstream-headers/usr//lib/modules/6.14.0-rc3-00350-g771dba31fffc/build/scripts/Makefile: No such file or directory This is because the "srcroot" variable is set to "." and the "build" variable is set to the absolute path. This makes the "src" variables point to wrong directory. Change the "build" variable to a relative path to "." to fix build. Fixes: 5f73e7d ("kbuild: refactor cross-compiling linux-headers package") Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent dd0b7d4 commit b5e3956

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)='"${destdir}"/scripts
66+
"${MAKE}" run-command KBUILD_RUN_COMMAND='+$(MAKE) HOSTCC='"${CC}"' VPATH= srcroot=. $(build)='"$(realpath --relative-base=. "${destdir}")"/scripts
6767

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

0 commit comments

Comments
 (0)