diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-12-26 22:52:39 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-12-29 22:25:21 +0900 |
commit | 7d4f07d5cb71728cea2b6fe8b087a0ce1dbda23a (patch) | |
tree | 4128d470f9edd078b2ea411a508041970c408043 /scripts/package/debian | |
parent | 466e6fc43fb9eefa26ec766f78ce18616bf84b9a (diff) | |
download | linux-7d4f07d5cb71728cea2b6fe8b087a0ce1dbda23a.tar.gz linux-7d4f07d5cb71728cea2b6fe8b087a0ce1dbda23a.tar.bz2 linux-7d4f07d5cb71728cea2b6fe8b087a0ce1dbda23a.zip |
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>
Diffstat (limited to 'scripts/package/debian')
-rwxr-xr-x | scripts/package/debian/rules | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules index 26bc6239e200..529b71b55efa 100755 --- a/scripts/package/debian/rules +++ b/scripts/package/debian/rules @@ -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 @@ -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 |