Skip to content

Commit

Permalink
kbuild: deb-pkg: squash scripts/package/deb-build-option to debian/rules
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Masahiro Yamada committed Dec 29, 2023
1 parent 466e6fc commit 7d4f07d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
14 changes: 0 additions & 14 deletions scripts/package/deb-build-option

This file was deleted.

5 changes: 3 additions & 2 deletions scripts/package/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ ifneq (,$(filter-out parallel=1,$(filter parallel=%,$(DEB_BUILD_OPTIONS))))
MAKEFLAGS += -j$(NUMJOBS)
endif

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

.PHONY: binary binary-indep binary-arch
binary: binary-arch binary-indep
Expand All @@ -24,7 +26,6 @@ build: build-arch build-indep
build-indep:
build-arch:
$(MAKE) -f $(srctree)/Makefile $(make-opts) \
$(shell $(srctree)/scripts/package/deb-build-option) \
olddefconfig all

.PHONY: clean
Expand Down

0 comments on commit 7d4f07d

Please sign in to comment.