Skip to content

Commit 7d4f07d

Browse files
committed
kbuild: deb-pkg: squash scripts/package/deb-build-option to debian/rules
The binary-arch target needs to use the same CROSS_COMPILE as used in build-arch; otherwise, 'make run-command' may attempt to resync the .config file. Squash scripts/package/deb-build-option into debian/rules, as it is a small amount of code. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <n.schier@avm.de>
1 parent 466e6fc commit 7d4f07d

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

scripts/package/deb-build-option

-14
This file was deleted.

scripts/package/debian/rules

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ ifneq (,$(filter-out parallel=1,$(filter parallel=%,$(DEB_BUILD_OPTIONS))))
1010
MAKEFLAGS += -j$(NUMJOBS)
1111
endif
1212

13-
make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE)
13+
revision = $(lastword $(subst -, ,$(shell dpkg-parsechangelog -S Version)))
14+
CROSS_COMPILE ?= $(filter-out $(DEB_BUILD_GNU_TYPE)-, $(DEB_HOST_GNU_TYPE)-)
15+
make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) KBUILD_BUILD_VERSION=$(revision) $(addprefix CROSS_COMPILE=,$(CROSS_COMPILE))
1416

1517
.PHONY: binary binary-indep binary-arch
1618
binary: binary-arch binary-indep
@@ -24,7 +26,6 @@ build: build-arch build-indep
2426
build-indep:
2527
build-arch:
2628
$(MAKE) -f $(srctree)/Makefile $(make-opts) \
27-
$(shell $(srctree)/scripts/package/deb-build-option) \
2829
olddefconfig all
2930

3031
.PHONY: clean

0 commit comments

Comments
 (0)